Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+5
View File
@@ -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
+17
View File
@@ -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
===========================================================================
+217
View File
@@ -0,0 +1,217 @@
# $NetBSD: Makefile,v 1.39 2013/06/04 07:38:49 wiz Exp $
VERSION= 3.3.2
DISTNAME= xen-${VERSION}
PKGNAME= xentools33-${VERSION}
PKGREVISION= 15
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
MAINTAINER= cegger@NetBSD.org
HOMEPAGE= http://xen.org/
COMMENT= Userland Tools for Xen 3.3.x
LICENSE= gnu-gpl-v2
#DEPENDS+= ${PYPKGPREFIX}-twisted-[0-9]*:../../net/py-twisted
DEPENDS+= ${PYPKGPREFIX}-readline-[0-9]*:../../devel/py-readline
DEPENDS+= ${PYPKGPREFIX}-curses>=0nb4:../../devel/py-curses
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-[5-9].*-x86_64 NetBSD-[5-9].*-i386
CONFLICTS+= libxen-[0-9]*
CONFLICTS+= xentools20-[0-9]*
CONFLICTS+= xentools30-* xentools3-*
CONFLICTS+= xenstoretools-*
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+= xentrace/Makefile
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"
REPLACE_PYTHON+= misc/xsview
.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 qemu-ifup xen-subr
CONF_FILES= ${EGDIR}/formats ${PKG_SYSCONFDIR}/formats
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
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes -Wno-error=format-security
EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \
-Wno-error=tautological-compare -Wno-error=null-dereference \
-Wno-error=self-assign -Wno-error=sometimes-uninitialized
.endif
MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
pre-build:
rm -f ${WRKSRC}/check/check_x11_devel
.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/ncurses/buildlink3.mk"
#.include "../../devel/SDL/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+555
View File
@@ -0,0 +1,555 @@
@comment $NetBSD: PLIST,v 1.10 2011/01/12 00:12:13 jym Exp $
bin/lsevtchn
bin/pygrub
bin/readnotes
bin/xc_restore
bin/xc_save
bin/xen-detect
bin/xencons
bin/xenconsole
bin/xenctx
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
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-x86_64.h
include/xen/arch-x86/xen.h
include/xen/arch-x86_32.h
include/xen/arch-x86_64.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/x86_64.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/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/xenpm
sbin/xenstored
sbin/xentop
sbin/xentrace_setmask
sbin/xm
sbin/xsview
share/doc/xen/README.blktap
share/doc/xen/README.xenmon
share/examples/rc.d/xenbackendd
share/examples/rc.d/xend
share/examples/rc.d/xendomains
share/examples/xen/block
share/examples/xen/formats
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/xen-subr
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
+64
View File
@@ -0,0 +1,64 @@
$NetBSD: distinfo,v 1.29 2013/04/11 19:57:52 joerg Exp $
SHA1 (xen-3.3.2.tar.gz) = 7f438e73ac81b25cf5e1570709e87001066bafe4
RMD160 (xen-3.3.2.tar.gz) = 28faa56286f2a418e35dcba6079570ea871d6c7b
Size (xen-3.3.2.tar.gz) = 11357576 bytes
SHA1 (patch-CVE-2011-1583) = c9f59d9fbb20f0cb76733a4c2d136a67253cae0a
SHA1 (patch-aa) = 74c3023e39baf488f8bae060e93f6175b32df61a
SHA1 (patch-ab) = 393c908858c81e526462a07de9b38fb449d294c3
SHA1 (patch-ac) = 70af1b1a787b9dad9e41a2ffe14d595c6797b4d7
SHA1 (patch-ad) = ccd63ed718e5ba3a742f181ae84af82e85f2f0c4
SHA1 (patch-ae) = bb7116a71bf6637591b639511f055836a13d9887
SHA1 (patch-af) = 0d4cd2bc3c56934bd072bc72b34e5ed677d04969
SHA1 (patch-ag) = 6b6c26c5fbb28b9cc37e76b250cc90fed111e78a
SHA1 (patch-ah) = cc8d95c73d7f4a08f311e8417d26f53ffd010549
SHA1 (patch-ai) = 0906a5ec3a7450fc987b01289e2560e60966d00d
SHA1 (patch-aj) = 64c87cd4d1d22af745043bc66b4fbab884920278
SHA1 (patch-ak) = 17deee0790c25513efe15656389905658a9adaa5
SHA1 (patch-al) = fc25048cf5bdf7d293f0f634890620576d8f4b11
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) = 49c1b77b451b63cfe3a1fded7f6d0410d4c3cf92
SHA1 (patch-bj) = 4c6b6a73d3ea5fb2c57b12dd4651f59024119276
SHA1 (patch-bk) = a79256edc3dc2a5f4bcdbe1a2d14037ad74f11de
SHA1 (patch-blktap_drivers_block-qcow.c) = 035411d811171fea46c8dec6534018370ef22e14
SHA1 (patch-blktaplib_h) = a37ecaaefcd694be54bb75163339650be69f9250
SHA1 (patch-ca) = b62ec8f0db5e65d737d1aaf3bd44580f5969328b
SHA1 (patch-cb) = 9b7834e367a1820f28c0c1053d3f351751a12283
SHA1 (patch-cc) = 598f7cda0e3137188f97605037b0b1c26ae8d0c0
SHA1 (patch-cd) = 5563a72e203e789a86f4166c71ddb3fcff5215c6
SHA1 (patch-ce) = 24d71f68a93b59bd5c5441c257d34862e7302040
SHA1 (patch-cf) = 055af260b497cbfaa5732f05267526e9fb1d1536
SHA1 (patch-cg) = 1f6ec716a101256274b6fff47b825271403a1ee0
SHA1 (patch-da) = f05d504ea9160af781f82652308fbb98c7925a8f
SHA1 (patch-db) = 6e9e9d0e06716990c1532968aed97fe8a3877869
SHA1 (patch-dc) = fdbe8e8c5f4f00b6c5212d429e830af5dc51d92b
SHA1 (patch-dd) = e94a0ff0c0d30f7441675f52b5f13e575f09dff8
SHA1 (patch-de) = 3e08b61cc625cfd1a4eaacbd4a325a28ce315919
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) = d5afc1a1e16f26203a5615142efda8fade48b371
SHA1 (patch-fd) = 619b865b2f17814e6e62ebab21de9183474dd075
SHA1 (patch-fe) = 85d42672766fe8ce2dc7f745938722710c6ee5a3
SHA1 (patch-ff) = 6ff97fa4f34f29c276e4aaab4b4db9ccf7b09957
SHA1 (patch-fg) = 913295d341c1dd5bf4d1ef78f27520920f138d4c
SHA1 (patch-io_ring_h) = 83b01462d5d2b48b4f97b3d9a7980aa3300ad0b3
SHA1 (patch-ioemu_block-vvfat.c) = 4e6d998fe2c006bb68caaf8e1d11e641319ff5c2
SHA1 (patch-python_xen_util_xmlrpcclient.py) = 2f983bc67930b86b538743dab6bc81d9aacc6b35
SHA1 (patch-python_xen_util_xmlrpclib2.py) = 4977ebd86c7d76e1dc861c0f839c506446e384a5
SHA1 (patch-qemu-e1000-CVSE-2012-0029) = 8628504e1dfd013254f816cb4feeb7548b9ad2ec
SHA1 (patch-qemu-phy-devices) = 29790e45372ae16157e906dc39a667229e8a0ba5
+39
View File
@@ -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;
}
@@ -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;
}
+88
View File
@@ -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
+68
View File
@@ -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'
#============================================================================
+48
View File
@@ -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 optional, 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 = ""
#============================================================================
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
ifconfig $1 up
exec /sbin/brconfig $2 add $1
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh -e
# $NetBSD: vif-bridge-nbsd,v 1.2 2011/01/12 00:12:14 jym Exp $
# Called by xenbackendd
# Usage: vif-bridge xsdir_backend_path state
dir=$(dirname $0)
. "$dir/xen-subr"
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=$(xenstore_read_default "$xpath/vifname" "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
+36
View File
@@ -0,0 +1,36 @@
#!/bin/sh -e
# $NetBSD: vif-ip-nbsd,v 1.2 2011/01/12 00:12:14 jym Exp $
# Called by xenbackendd
# Usage: vif-ip xsdir_backend_path state
dir=$(dirname $0)
. "$dir/xen-subr"
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=$(xenstore_read_default "$xpath/vifname" "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
+11
View File
@@ -0,0 +1,11 @@
# $NetBSD: xen-subr-nbsd,v 1.1 2011/01/12 00:12:14 jym Exp $
#
# Contains commonly used functions which are used by Xen scripts
# xenstore_read_default path default
#
# Read the given path in XenStore. Return default if path does not exist
#
xenstore_read_default() {
xenstore-read "$1" 2>/dev/null || echo "$2"
}
+319
View File
@@ -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);
}
+17
View File
@@ -0,0 +1,17 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: xenbackendd.sh,v 1.2 2011/10/07 22:37:06 shattered 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"
+30
View File
@@ -0,0 +1,30 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: xend.sh,v 1.2 2009/01/17 12:31:10 bouyer Exp $
#
# PROVIDE: xend
# REQUIRE: DAEMON
. /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"
+136
View File
@@ -0,0 +1,136 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: xendomains.sh,v 1.2 2012/07/16 22:55:25 jym 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
if ! $cmdline; then
echo "Pre-hook \`\`$cmdline'' failed... skipping $domain."
continue
fi
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"
@@ -0,0 +1,84 @@
$NetBSD: patch-CVE-2011-1583,v 1.1 2011/05/12 15:39:05 bouyer Exp $
from http://lists.xensource.com/archives/html/xen-devel/2011-05/msg00491.html
# HG changeset patch
# Parent 11931301845c3b4b6a358f2d7246874b1d10c05f
diff -r 11931301845c libxc/xc_dom_bzimageloader.c
--- libxc/xc_dom_bzimageloader.c Mon Mar 14 16:59:49 2011 +0000
+++ libxc/xc_dom_bzimageloader.c Tue May 03 10:09:28 2011 +0100
@@ -61,18 +61,18 @@
extern struct xc_dom_loader elf_loader;
-static unsigned int payload_offset(struct setup_header *hdr)
+static int check_magic(struct xc_dom_image *dom, const void *magic, size_t len)
{
- unsigned int off;
+ if (len > dom->kernel_size)
+ return 0;
- off = (hdr->setup_sects + 1) * 512;
- off += hdr->payload_offset;
- return off;
+ return (memcmp(dom->kernel_blob, magic, len) == 0);
}
static int check_bzimage_kernel(struct xc_dom_image *dom, int verbose)
{
struct setup_header *hdr;
+ uint64_t payload_offset, payload_length;
if ( dom->kernel_blob == NULL )
{
@@ -107,14 +107,43 @@
return -EINVAL;
}
- dom->kernel_blob = dom->kernel_blob + payload_offset(hdr);
- dom->kernel_size = hdr->payload_length;
- if ( xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size) == -1 )
+ /* upcast to 64 bits to avoid overflow */
+ /* setup_sects is u8 and so cannot overflow */
+ payload_offset = (hdr->setup_sects + 1) * 512;
+ payload_offset += hdr->payload_offset;
+ payload_length = hdr->payload_length;
+
+ if ( payload_offset >= dom->kernel_size )
{
- if ( verbose )
- xc_dom_panic(XC_INVALID_KERNEL, "%s: unable to decompress kernel\n",
- __FUNCTION__);
+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload offset overflow",
+ __FUNCTION__);
+ return -EINVAL;
+ }
+ if ( (payload_offset + payload_length) > dom->kernel_size )
+ {
+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload length overflow",
+ __FUNCTION__);
+ return -EINVAL;
+ }
+
+ dom->kernel_blob = dom->kernel_blob + payload_offset;
+ dom->kernel_size = payload_length;
+
+ if ( check_magic(dom, "\037\213", 2) )
+ {
+ if ( xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size) == -1 )
+ {
+ if ( verbose )
+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unable to decompress kernel\n",
+ __FUNCTION__);
+ return -EINVAL;
+ }
+ }
+ else
+ {
+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unknown compression format\n",
+ __FUNCTION__);
return -EINVAL;
}
+22
View File
@@ -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
+40
View File
@@ -0,0 +1,40 @@
$NetBSD: patch-ab,v 1.3 2013/04/11 19:57:52 joerg Exp $
--- ../Config.mk.orig 2009-08-06 13:17:07.000000000 +0000
+++ ../Config.mk
@@ -15,7 +15,7 @@ SHELL ?= /bin/sh
# Tools to run on system hosting the build
HOSTCC = gcc
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCFLAGS += -fno-strict-aliasing
+HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
DISTDIR ?= $(XEN_ROOT)/dist
DESTDIR ?= /
@@ -66,7 +66,7 @@ CFLAGS += -Wall -Wstrict-prototypes
# -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
# result of any casted expression causes a warning.
-CFLAGS += -Wno-unused-value
+CFLAGS += -Wno-unused-value -Wno-switch
HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
@@ -74,6 +74,8 @@ CFLAGS += $(call cc-option,$(CC),-Wd
LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
+CFLAGS += $(EXTRA_CFLAGS)
+
# Enable XSM security module. Enabling XSM requires selection of an
# XSM security module (FLASK_ENABLE or ACM_SECURITY).
XSM_ENABLE ?= n
@@ -90,7 +92,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
+24
View File
@@ -0,0 +1,24 @@
$NetBSD: patch-ac,v 1.2 2008/08/19 17:38:09 cegger Exp $
--- ../config/NetBSD.mk.orig 2008-08-14 15:26:06.000000000 +0000
+++ ../config/NetBSD.mk
@@ -2,3 +2,19 @@ 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)
+DOCDIR = $(PREFIX)/share/doc/xen
+MANDIR = $(PREFIX)/man
+MAN1DIR = $(MANDIR)/man1
+MAN8DIR = $(MANDIR)/man8
+SBINDIR = $(PREFIX)/sbin
+
+PRIVATE_PREFIX = $(PREFIX)
+PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin
+18
View File
@@ -0,0 +1,18 @@
$NetBSD: patch-ad,v 1.2 2010/01/01 00:34:53 ver Exp $
--- console/Makefile.orig 2009-08-06 12:56:32.000000000 +0000
+++ console/Makefile
@@ -29,9 +29,9 @@ 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)
-include $(DEPS)
+32
View File
@@ -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:
+46
View File
@@ -0,0 +1,46 @@
$NetBSD: patch-af,v 1.3 2009/08/07 12:49:21 cegger Exp $
--- misc/Makefile.orig 2009-08-06 14:56:36.000000000 +0200
+++ misc/Makefile
@@ -14,17 +14,21 @@ TARGETS-y := xenperf
TARGETS-$(CONFIG_X86) += xen-detect xenpm
TARGETS := $(TARGETS-y)
-SUBDIRS-$(CONFIG_LOMOUNT) += lomount
+#SUBDIRS-$(CONFIG_LOMOUNT) += lomount
SUBDIRS-$(CONFIG_MINITERM) += miniterm
SUBDIRS := $(SUBDIRS-y)
-INSTALL_BIN-y := xencons
+INSTALL_BIN-y :=
+INSTALL_BIN_SCRIPT-y := xencons
INSTALL_BIN-$(CONFIG_X86) += xen-detect
INSTALL_BIN := $(INSTALL_BIN-y)
+INSTALL_BIN_SCRIPT := $(INSTALL_BIN_SCRIPT-y)
-INSTALL_SBIN-y := xm xen-bugtool xen-python-path xend xenperf xsview
+INSTALL_SBIN-y := xenperf
+INSTALL_SBIN_SCRIPT-y := xm xen-bugtool xen-python-path xend xsview
INSTALL_SBIN-$(CONFIG_X86) += xenpm
INSTALL_SBIN := $(INSTALL_SBIN-y)
+INSTALL_SBIN_SCRIPT := $(INSTALL_SBIN_SCRIPT-y)
DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
@@ -40,10 +44,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
+37
View File
@@ -0,0 +1,37 @@
$NetBSD: patch-ag,v 1.4 2008/09/30 15:08:34 joerg Exp $
--- xentrace/Makefile.orig 2008-08-22 09:49:09.000000000 +0000
+++ xentrace/Makefile
@@ -14,6 +14,7 @@ LIBBIN =
SCRIPTS = xentrace_format
MAN1 = $(wildcard *.1)
MAN8 = $(wildcard *.8)
+CONFIGDIR = @XENDCONFDIR@
ifeq ($(XEN_TARGET_ARCH),x86_32)
LIBBIN += xenctx
@@ -35,14 +36,16 @@ 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_LIB) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+ $(BSD_INSTALL_PROGRAM) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR)
+ $(BSD_INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
+ $(BSD_INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
+ $(BSD_INSTALL_DATA) formats $(DESTDIR)$(PREFIX)/share/examples/xen
.PHONY: clean
clean:
+23
View File
@@ -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:
+16
View File
@@ -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
+58
View File
@@ -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
+34
View File
@@ -0,0 +1,34 @@
$NetBSD: patch-ak,v 1.1 2010/10/30 20:06:52 tnn Exp $
From emulators/qemu/patches/patch-ee.
qemu-0.13.x will include this fix:
http://git.qemu.org/qemu.git/commit/?id=9651ac55e5de0e1534d898316cc851af6ffc4334
--- ioemu/hw/e1000.c.orig 2009-08-06 12:56:34.000000000 +0000
+++ ioemu/hw/e1000.c
@@ -244,16 +244,20 @@ set_eecd(E1000State *s, int index, uint3
s->eecd_state.old_eecd = val & (E1000_EECD_SK | E1000_EECD_CS |
E1000_EECD_DI|E1000_EECD_FWE_MASK|E1000_EECD_REQ);
+ if (!(E1000_EECD_CS & val)) // CS inactive; nothing to do
+ return;
+ if (E1000_EECD_CS & (val ^ oldval)) { // CS rise edge; reset state
+ s->eecd_state.val_in = 0;
+ s->eecd_state.bitnum_in = 0;
+ s->eecd_state.bitnum_out = 0;
+ s->eecd_state.reading = 0;
+ }
if (!(E1000_EECD_SK & (val ^ oldval))) // no clock edge
return;
if (!(E1000_EECD_SK & val)) { // falling edge
s->eecd_state.bitnum_out++;
return;
}
- if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset)
- memset(&s->eecd_state, 0, sizeof s->eecd_state);
- return;
- }
s->eecd_state.val_in <<= 1;
if (val & E1000_EECD_DI)
s->eecd_state.val_in |= 1;
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-al,v 1.1 2010/12/13 13:37:49 wiz Exp $
Compatibility fix for texi2html-5.0.
--- ioemu-qemu-xen/Makefile.orig 2009-08-04 14:53:20.000000000 +0000
+++ ioemu-qemu-xen/Makefile
@@ -237,7 +237,7 @@ cscope:
# documentation
%.html: %.texi
- texi2html -monolithic -number $<
+ texi2html -monolithic -number-sections $<
%.info: %.texi
makeinfo $< -o $@
+45
View File
@@ -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
+13
View File
@@ -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"
+22
View File
@@ -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)
+13
View File
@@ -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
+13
View File
@@ -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")
+13
View File
@@ -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")
+15
View File
@@ -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
+19
View File
@@ -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
+43
View File
@@ -0,0 +1,43 @@
$NetBSD: patch-bi,v 1.2 2009/08/07 12:49:21 cegger Exp $
--- xenstore/Makefile.orig 2009-08-06 14:56:38.000000000 +0200
+++ xenstore/Makefile
@@ -90,24 +90,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 $(DEPS)
+56
View File
@@ -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):
+13
View File
@@ -0,0 +1,13 @@
$NetBSD: patch-bk,v 1.1 2008/08/14 13:12:53 cegger Exp $
--- examples/xend-config.sxp.orig 2008-08-07 08:56:22.000000000 +0000
+++ examples/xend-config.sxp
@@ -185,7 +185,7 @@
# Whether to enable auto-ballooning of dom0 to allow domUs to be created.
# If enable-dom0-ballooning = no, dom0 will never balloon out.
-(enable-dom0-ballooning yes)
+(enable-dom0-ballooning no)
# In SMP system, dom0 will use dom0-cpus # of CPUS
# If dom0-cpus = 0, dom0 will take all cpus available
@@ -0,0 +1,14 @@
$NetBSD: patch-blktap_drivers_block-qcow.c,v 1.1 2013/04/11 19:57:53 joerg Exp $
--- blktap/drivers/block-qcow.c.orig 2013-03-28 16:51:10.000000000 +0000
+++ blktap/drivers/block-qcow.c
@@ -1078,7 +1078,8 @@ static int tdqcow_close(struct disk_driv
offset = sizeof(QCowHeader) + sizeof(uint32_t);
lseek(fd, offset, SEEK_SET);
out = cpu_to_be32(cksum);
- if (write(fd, &out, sizeof(uint32_t))) ;
+ if (write(fd, &out, sizeof(uint32_t)))
+ ;
close(fd);
}
@@ -0,0 +1,13 @@
$NetBSD: patch-blktaplib_h,v 1.1 2012/01/09 14:06:34 cegger Exp $
--- blktap/lib/blktaplib.h.orig 2009-08-06 12:56:32.000000000 +0000
+++ blktap/lib/blktaplib.h
@@ -42,7 +42,7 @@
#include <sys/types.h>
#include <unistd.h>
-#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE)
+#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE)
/* size of the extra VMA area to map in attached pages. */
#define BLKTAP_VMA_PAGES BLK_RING_SIZE
+17
View File
@@ -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.
+90
View File
@@ -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")
+47
View File
@@ -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
+36
View File
@@ -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
+40
View File
@@ -0,0 +1,40 @@
$NetBSD: patch-ce,v 1.2 2009/01/13 13:48:33 cegger Exp $
--- ../docs/man/xm.pod.1.orig 2009-01-05 11:26:58.000000000 +0000
+++ ../docs/man/xm.pod.1
@@ -75,7 +75,7 @@ in the config file. See L<xmdomain.cfg>
format, and possible options used in either the configfile or for I<vars>.
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
@@ -156,7 +156,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>
@@ -388,7 +388,7 @@ file format, and possible options used i
I<vars>.
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@.
The new subcommand will return without starting the domain. The
domain needs to be started using the B<xm start> command.
@@ -1068,7 +1068,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.
+12
View File
@@ -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']:
+15
View File
@@ -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)
+34
View File
@@ -0,0 +1,34 @@
$NetBSD: patch-da,v 1.2 2009/08/07 12:49:21 cegger Exp $
--- libfsimage/common/Makefile.orig 2009-08-06 14:56:35.000000000 +0200
+++ libfsimage/common/Makefile
@@ -4,6 +4,8 @@ include $(XEN_ROOT)/tools/Rules.mk
MAJOR = 1.0
MINOR = 0
+CFLAGS += -DFSIMAGE_FSDIR=\"$(LIBDIR)/fs\"
+
LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
LDFLAGS = $(LDFLAGS-y)
@@ -19,14 +21,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)
+22
View File
@@ -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
+23
View File
@@ -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:
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-dd,v 1.2 2009/08/07 12:49:21 cegger Exp $
--- flask/loadpolicy/Makefile.orig 2009-08-06 14:56:33.000000000 +0200
+++ flask/loadpolicy/Makefile
@@ -48,8 +48,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 $(DEPS)
+119
View File
@@ -0,0 +1,119 @@
$NetBSD: patch-de,v 1.2 2009/08/07 12:49:21 cegger Exp $
--- examples/Makefile.orig 2009-08-06 14:56:33.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,7 +41,7 @@ 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
UDEVVER = 0
@@ -52,7 +52,7 @@ ifeq ($(shell [ -x /usr/bin/udevinfo ] &
UDEVVER = $(shell /usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' )
endif
-UDEV_RULES_DIR = /etc/udev
+UDEV_RULES_DIR = ${PKG_SYSCONFDIR}/udev
UDEV_RULES = xen-backend.rules
DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
@@ -79,60 +79,55 @@ install: all install-readmes install-ini
.PHONY: install-readmes
install-readmes:
[ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
- $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
set -e; for i in $(XEN_READMES); \
do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
- $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
+ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
done
.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
+51
View File
@@ -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:
+13
View File
@@ -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"
+13
View File
@@ -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'.
"""
+13
View File
@@ -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
+24
View File
@@ -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.
+22
View File
@@ -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
+17
View File
@@ -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
+16
View File
@@ -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
+24
View File
@@ -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
+36
View File
@@ -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
+35
View File
@@ -0,0 +1,35 @@
$NetBSD: patch-fc,v 1.3 2009/10/18 21:28:10 bouyer Exp $
--- ioemu/vl.c.orig 2009-01-05 12:26:59.000000000 +0100
+++ ioemu/vl.c 2009-10-18 23:08:55.000000000 +0200
@@ -108,7 +108,7 @@
#include "exec-all.h"
-#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
+#define DEFAULT_NETWORK_SCRIPT "@XENDCONFDIR@/scripts/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
@@ -1914,8 +1914,11 @@
}
/* Set raw attributes on the pty. */
+ if (tcgetattr(master_fd, &tty) < 0)
+ perror("tcgetattr");
cfmakeraw(&tty);
- tcsetattr(slave_fd, TCSAFLUSH, &tty);
+ if (tcsetattr(slave_fd, TCSAFLUSH, &tty) < 0)
+ perror("tcsetattr");
fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));
+66
View File
@@ -0,0 +1,66 @@
$NetBSD: patch-fd,v 1.3 2010/12/13 13:37:49 wiz Exp $
Last chunk: Compatibility fix for texi2html-5.0.
--- ioemu/Makefile.orig 2009-08-06 12:56:33.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 \
@@ -118,7 +119,7 @@ cscope:
# documentation
%.html: %.texi
- texi2html -monolithic -number $<
+ texi2html -monolithic -number-sections $<
%.info: %.texi
makeinfo $< -o $@
+37
View File
@@ -0,0 +1,37 @@
$NetBSD: patch-fe,v 1.3 2008/08/15 14:06:54 cegger Exp $
--- ioemu/Makefile.target.orig 2008-08-14 15:26:06.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
@@ -544,7 +545,7 @@ $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
ifdef CONFIG_STUBDOM
$(AR) rcs $@ $(VL_OBJS)
else
- $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
+ $(CC) $(VL_LDFLAGS) -Wl,-rpath,$(LIBDIR) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
endif
cocoa.o: cocoa.m
@@ -660,12 +661,11 @@ 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)"
ifneq ($(wildcard .depend),)
include .depend
+36
View File
@@ -0,0 +1,36 @@
$NetBSD: patch-ff,v 1.1 2010/05/05 06:12:36 cegger Exp $
--- python/xen/util/acmpolicy.py.orig 2009-08-06 12:56:37.000000000 +0000
+++ python/xen/util/acmpolicy.py
@@ -17,12 +17,19 @@
#============================================================================
import os
-import sha
import stat
import array
import struct
import shutil
import commands
+
+# sha is deprecated as of python 2.6
+try:
+ from hashlib import sha1
+except ImportError:
+ # but hashlib was only added in python 2.5
+ from sha import new as sha1
+
from xml.dom import minidom, Node
from xen.xend.XendLogging import log
from xen.util import xsconstants, bootloader, mkdir
@@ -1102,8 +1109,8 @@ class ACMPolicy(XSPolicy):
return None
def hash(self):
- """ Calculate a SAH1 hash of the XML policy """
- return sha.sha(self.toxml())
+ """ Calculate a SHA1 hash of the XML policy """
+ return sha1(self.toxml())
def save(self):
### Save the XML policy into a file ###
+47
View File
@@ -0,0 +1,47 @@
$NetBSD: patch-fg,v 1.1 2010/05/05 06:12:36 cegger Exp $
--- python/xen/xend/XendAPI.py.orig 2009-08-06 12:56:37.000000000 +0000
+++ python/xen/xend/XendAPI.py
@@ -18,7 +18,6 @@
import inspect
import os
import Queue
-import sets
import string
import sys
import traceback
@@ -26,6 +25,12 @@ import threading
import time
import xmlrpclib
+# sets is deprecated as of python 2.6, but set is unavailable in 2.3
+try:
+ set
+except NameError:
+ from sets import Set as set
+
import XendDomain, XendDomainInfo, XendNode, XendDmesg
import XendLogging, XendTaskManager, XendAPIStore
@@ -117,16 +122,17 @@ event_registrations = {}
def event_register(session, reg_classes):
if session not in event_registrations:
event_registrations[session] = {
- 'classes' : sets.Set(),
+ 'classes' : set(),
'queue' : Queue.Queue(EVENT_QUEUE_LENGTH),
'next-id' : 1
}
if not reg_classes:
reg_classes = classes
- if hasattr(set, 'union_update'):
- event_registrations[session]['classes'].union_update(reg_classes)
+ sessionclasses = event_registrations[session]['classes']
+ if hasattr(sessionclasses, 'union_update'):
+ sessionclasses.union_update(reg_classes)
else:
- event_registrations[session]['classes'].update(reg_classes)
+ sessionclasses.update(reg_classes)
@@ -0,0 +1,17 @@
$NetBSD: patch-io_ring_h,v 1.1 2012/01/09 14:06:34 cegger Exp $
--- ../xen/include/public/io/ring.h.orig 2009-08-06 12:56:43.000000000 +0000
+++ ../xen/include/public/io/ring.h
@@ -50,6 +50,12 @@ typedef unsigned int RING_IDX;
* A ring contains as many entries as will fit, rounded down to the nearest
* power of two (so we can mask with (size-1) to loop around).
*/
+#define __CONST_RING_SIZE(_s, _sz) \
+ (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \
+ sizeof(((struct _s##_sring *)0)->ring[0])))
+/*
+ * The same for passing in an actual pointer instead of a name tag.
+ */
#define __RING_SIZE(_s, _sz) \
(__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
@@ -0,0 +1,13 @@
$NetBSD: patch-ioemu_block-vvfat.c,v 1.1 2013/04/11 19:57:53 joerg Exp $
--- ioemu/block-vvfat.c.orig 2013-03-28 16:52:33.000000000 +0000
+++ ioemu/block-vvfat.c
@@ -175,7 +175,7 @@ static inline int array_roll(array_t* ar
return 0;
}
-inline int array_remove_slice(array_t* array,int index, int count)
+static inline int array_remove_slice(array_t* array,int index, int count)
{
assert(index >=0);
assert(count > 0);
@@ -0,0 +1,26 @@
$NetBSD: patch-python_xen_util_xmlrpcclient.py,v 1.1 2012/04/07 14:48:12 bsiegert Exp $
--- python/xen/util/xmlrpcclient.py.orig 2012-04-02 21:17:56.000000000 +0000
+++ python/xen/util/xmlrpcclient.py
@@ -22,6 +22,7 @@ import socket
import string
import xmlrpclib
from types import StringTypes
+from sys import hexversion
try:
@@ -54,7 +55,12 @@ class UnixTransport(xmlrpclib.Transport)
return xmlrpclib.Transport.request(self, host, '/RPC2',
request_body, verbose)
def make_connection(self, host):
- return HTTPUnix(self.__handler)
+ if hexversion < 0x02070000:
+ # python 2.6 or earlier
+ return HTTPUnix(self.__handler)
+ else:
+ # xmlrpclib.Transport changed in python 2.7
+ return HTTPUnixConnection(self.__handler)
# We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
@@ -0,0 +1,14 @@
$NetBSD: patch-python_xen_util_xmlrpclib2.py,v 1.1 2012/04/07 14:48:12 bsiegert Exp $
--- python/xen/util/xmlrpclib2.py.orig 2012-04-02 21:20:21.000000000 +0000
+++ python/xen/util/xmlrpclib2.py
@@ -58,6 +58,9 @@ def stringify(value):
# some bugs in Keep-Alive handling and also enabled it by default
class XMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
protocol_version = "HTTP/1.1"
+ # xend crashes in python 2.7 unless disable_nagle_algorithm = False
+ # it isn't used in earlier versions so it is harmless to set it generally
+ disable_nagle_algorithm = False
def __init__(self, hosts_allowed, request, client_address, server):
self.hosts_allowed = hosts_allowed
@@ -0,0 +1,39 @@
$NetBSD: patch-qemu-e1000-CVSE-2012-0029,v 1.1 2012/02/03 17:00:25 bouyer Exp $
Backported from:
From 3cf61880403b4e484539596a95937cc066243388 Mon Sep 17 00:00:00 2001
From: Ian Campbell <Ian.Campbell@citrix.com>
Date: Thu, 2 Feb 2012 13:47:06 +0000
Subject: [PATCH] e1000: bounds packet size against buffer size
Otherwise we can write beyond the buffer and corrupt memory. This is tracked
as CVE-2012-0029.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(Backported from qemu upstream 65f82df0d7a71ce1b10cd4c5ab08888d176ac840
by Ian Campbell.)
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
(cherry picked from commit ebe37b2a3f844bad02dcc30d081f39eda06118f8)
--- ioemu/hw/e1000.c.orig 2009-08-06 14:56:34.000000000 +0200
+++ ioemu/hw/e1000.c 2012-02-03 14:51:56.000000000 +0100
@@ -397,6 +401,8 @@
bytes = split_size;
if (tp->size + bytes > msh)
bytes = msh - tp->size;
+
+ bytes = MIN(sizeof(tp->data) - tp->size, bytes);
cpu_physical_memory_read(addr, tp->data + tp->size, bytes);
if ((sz = tp->size + bytes) >= hdr && tp->size < hdr)
memmove(tp->header, tp->data, hdr);
@@ -412,6 +418,7 @@
// context descriptor TSE is not set, while data descriptor TSE is set
DBGOUT(TXERR, "TCP segmentaion Error\n");
} else {
+ split_size = MIN(sizeof(tp->data) - tp->size, split_size);
cpu_physical_memory_read(addr, tp->data + tp->size, split_size);
tp->size += split_size;
}
@@ -0,0 +1,91 @@
$NetBSD: patch-qemu-phy-devices,v 1.1 2011/05/20 17:09:21 bouyer Exp $
This does 2 things:
- use the correct way to get the size of a disk device or partition (from
haad@NetBSD.org)
- if given a block device, use the character device instead.
--- ioemu/block-raw.c.orig 2009-08-06 14:56:33.000000000 +0200
+++ ioemu/block-raw.c 2011-05-20 18:55:59.000000000 +0200
@@ -63,6 +63,13 @@
#include <sys/disklabel.h>
#include <sys/dkio.h>
#endif
+#if defined(__NetBSD__)
+#include <sys/ioctl.h>
+#include <sys/disklabel.h>
+#include <sys/dkio.h>
+#include <sys/disk.h>
+#include <sys/param.h>
+#endif
//#define DEBUG_FLOPPY
@@ -101,6 +108,33 @@
{
BDRVRawState *s = bs->opaque;
int fd, open_flags, ret;
+#ifdef __NetBSD__
+ struct stat sb;
+ static char namebuf[MAXPATHLEN];
+ const char *dp;
+
+ if (lstat(filename, &sb) < 0) {
+ fprintf(stderr, "%s: stat failed: %s\n", filename, strerror(errno));
+ return -errno;
+ }
+ if (S_ISLNK(sb.st_mode)) {
+ fprintf(stderr, "%s: symolink links not supported by qemu-dm\n",
+ filename);
+ return -EINVAL;
+ }
+ if (S_ISBLK(sb.st_mode)) {
+ dp = strrchr(filename, '/');
+ if (dp == NULL) {
+ snprintf(namebuf, MAXPATHLEN, "r%s", filename);
+ } else {
+ snprintf(namebuf, MAXPATHLEN, "%.*s/r%s",
+ (int)(dp - filename), filename, dp + 1);
+ }
+ fprintf(stderr, "%s is a block device", filename);
+ filename = namebuf;
+ fprintf(stderr, ", using %s\n", filename);
+ }
+#endif
s->lseek_err_cnt = 0;
@@ -533,7 +567,7 @@
return 0;
}
-#ifdef __OpenBSD__
+#if defined(__OpenBSD__) || defined(__NetBSD__)
static int64_t raw_getlength(BlockDriverState *bs)
{
int fd = ((BDRVRawState*)bs->opaque)->fd;
@@ -541,11 +575,24 @@
if(fstat(fd, &st))
return -1;
if(S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)){
+#ifdef __OpenBSD__
struct disklabel dl;
if(ioctl(fd, DIOCGDINFO, &dl))
return -1;
return (uint64_t)dl.d_secsize *
dl.d_partitions[DISKPART(st.st_rdev)].p_size;
+#else
+ struct dkwedge_info dkw;
+ if (ioctl(fd, DIOCGWEDGEINFO, &dkw) != -1) {
+ return dkw.dkw_size * 512;
+ } else {
+ struct disklabel dl;
+ if(ioctl(fd, DIOCGDINFO, &dl))
+ return -1;
+ return (uint64_t)dl.d_secsize *
+ dl.d_partitions[DISKPART(st.st_rdev)].p_size;
+ }
+#endif
}else
return st.st_size;
}