diff options
29 files changed, 1 insertions, 830 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 9b69545c4cb..9967e375638 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.476 2009/07/26 18:25:01 drochner Exp $ +# $NetBSD: Makefile,v 1.477 2009/09/07 18:21:23 joerg Exp $ # COMMENT= System utilities @@ -374,11 +374,9 @@ SUBDIR+= xbatt SUBDIR+= xbattbar SUBDIR+= xcdroast SUBDIR+= xdu -SUBDIR+= xen12 SUBDIR+= xenkernel20 SUBDIR+= xenkernel3 SUBDIR+= xenkernel33 -SUBDIR+= xentools12 SUBDIR+= xentools20 SUBDIR+= xentools3 SUBDIR+= xentools3-hvm diff --git a/sysutils/xen12/DESCR b/sysutils/xen12/DESCR deleted file mode 100644 index daf9501e3c5..00000000000 --- a/sysutils/xen12/DESCR +++ /dev/null @@ -1,6 +0,0 @@ -Xen is a virtual machine monitor for x86 that supports execution of -multiple guest operating systems with unprecedented levels of performance -and resource isolation. Xen is Open Source software. - -See http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ for more details on -Xen. diff --git a/sysutils/xen12/MESSAGE b/sysutils/xen12/MESSAGE deleted file mode 100644 index d222e3985ac..00000000000 --- a/sysutils/xen12/MESSAGE +++ /dev/null @@ -1,19 +0,0 @@ -=========================================================================== -$NetBSD: MESSAGE,v 1.1 2004/05/22 16:31:04 cl Exp $ - -Xen is a standalone program, it does not run within an operating system. -It has been designed to boot from grub. To install Xen, add an entry -like this to the grub config file: - -- NetBSD/xen as domain0: - title Xen / NetBSD - kernel ${PREFIX}/mdec/xen-1.2.gz dom0_mem=65536 - module /path/to/xen12load - module /path/to/xen12netbsd - -- XenoLinux as domain0: - title Xen / Linux - kernel ${PREFIX}/mdec/xen-1.2.gz dom0_mem=65536 - module /path/to/xenolinux-version.gz root=/dev/root-device - -=========================================================================== diff --git a/sysutils/xen12/Makefile b/sysutils/xen12/Makefile deleted file mode 100644 index b61508f7051..00000000000 --- a/sysutils/xen12/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $NetBSD: Makefile,v 1.13 2007/10/07 12:59:15 kano Exp $ -# - -DISTNAME= xeno-1.2-src-040418 -PKGNAME= xen12-040418 -PKGREVISION= 1 -CATEGORIES= sysutils -MASTER_SITES= ftp://ftp.NetBSD.org/pub/NetBSD/arch/xen/misc/ -EXTRACT_SUFX= .tgz -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} -DISTFILES+= xen12-addtl-ide-dma-040522.tar.gz - -MAINTAINER= cl@NetBSD.org -HOMEPAGE= http://www.NetBSD.org/ports/xen/ -COMMENT= Xen Virtual Machine Monitor - -ONLY_FOR_PLATFORM= *-*-i386 - -WRKSRC= ${WRKDIR}/xeno-1.2/xen -BUILD_TARGET= default - - -USE_TOOLS+= gmake - -.include "../../mk/bsd.prefs.mk" - -BUILD_DEFS+= XEN12_USE_COM2 - -.if defined(XEN12_USE_COM2) && !empty(XEN12_USE_COM2:M[Yy][Ee][Ss]) -PATCHFILES+= xen12-com2-support-040522.diff -SITES.xen12-com2-support-040522.diff=ftp://ftp.NetBSD.org/pub/NetBSD/arch/xen/misc/ -.endif - -post-extract: - @${CP} ${FILESDIR}/stdarg.h ${WRKSRC}/include/stdarg.h - @${CP} ${WRKDIR}/xen12-addtl-ide-dma-040522/drivers/ide/* ${WRKSRC}/drivers/ide/ - -do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/mdec - ${INSTALL_DATA} ${WRKSRC}/xen.gz ${PREFIX}/mdec/xen-1.2.gz - -.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/xen12/PLIST b/sysutils/xen12/PLIST deleted file mode 100644 index 7d7feef0474..00000000000 --- a/sysutils/xen12/PLIST +++ /dev/null @@ -1,2 +0,0 @@ -@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:16:21 joerg Exp $ -mdec/xen-1.2.gz diff --git a/sysutils/xen12/distinfo b/sysutils/xen12/distinfo deleted file mode 100644 index 0ce042aa8ca..00000000000 --- a/sysutils/xen12/distinfo +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: distinfo,v 1.5 2005/10/20 18:13:30 wiz Exp $ - -SHA1 (xeno-1.2-src-040418.tgz) = d19f627dc40416f369f6728fcd86e4364e1713ee -RMD160 (xeno-1.2-src-040418.tgz) = c3fec4a6f9cc4478abb493269f163b6498dff260 -Size (xeno-1.2-src-040418.tgz) = 2960238 bytes -SHA1 (xen12-addtl-ide-dma-040522.tar.gz) = b6303d9946b5d8ddc4fd48a27fbb4df28d5d60fb -RMD160 (xen12-addtl-ide-dma-040522.tar.gz) = 73208c0c61d612236711971d174a62a1eaa6b4ab -Size (xen12-addtl-ide-dma-040522.tar.gz) = 26070 bytes -SHA1 (xen12-com2-support-040522.diff) = 41acce2e7ddafd07253a2510ecf6317d6828ea4d -RMD160 (xen12-com2-support-040522.diff) = e336ba84aa28ec9fddd70586cbb38de0817fe9a0 -Size (xen12-com2-support-040522.diff) = 1142 bytes -SHA1 (patch-aa) = f7a8aa7c0081660d3408bb8d680d2ed4335b49f9 -SHA1 (patch-ab) = d82fc9a443dda29e88fe2aeb028d0783ca5ba5b3 -SHA1 (patch-ac) = 559bbdc222ca3698492eaf452f0bf0a4389fa860 -SHA1 (patch-ad) = 5c2a10707a60f9f62d4c2a63164bd28a8a650b59 diff --git a/sysutils/xen12/files/stdarg.h b/sysutils/xen12/files/stdarg.h deleted file mode 100644 index 4c65de165cd..00000000000 --- a/sysutils/xen12/files/stdarg.h +++ /dev/null @@ -1,67 +0,0 @@ -/* $NetBSD: stdarg.h,v 1.1 2005/03/14 16:06:46 rillig Exp $ */ -/* NetBSD: stdarg.h,v 1.19 2000/05/05 00:21:48 thorpej Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 - */ - -#ifndef _I386_STDARG_H_ -#define _I386_STDARG_H_ - -#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 96 -#define _BSD_VA_LIST_ __builtin_va_list /* GCC built-in type */ -#else -#define _BSD_VA_LIST_ char * /* va_list */ -#endif - -typedef _BSD_VA_LIST_ va_list; - -#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 96 -#define va_start(ap, last) __builtin_stdarg_start((ap), (last)) -#define va_arg __builtin_va_arg -#define va_end __builtin_va_end -#else -#define __va_size(type) \ - (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) - -#define va_start(ap, last) \ - ((ap) = (va_list)__builtin_next_arg(last)) - -#define va_arg(ap, type) \ - (*(type *)(void *)((ap) += __va_size(type), (ap) - __va_size(type))) - -#define va_end(ap) -#endif - -#endif /* !_I386_STDARG_H_ */ diff --git a/sysutils/xen12/patches/patch-aa b/sysutils/xen12/patches/patch-aa deleted file mode 100644 index e913c8740dc..00000000000 --- a/sysutils/xen12/patches/patch-aa +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-aa,v 1.1 2004/05/22 16:31:04 cl Exp $ - ---- arch/i386/boot/boot.S.orig 2004-04-18 04:29:10.000000000 +0200 -+++ arch/i386/boot/boot.S -@@ -103,7 +103,8 @@ continue_boot_cpu: - sub %ebx,%ecx /* %ecx = byte len of all mods */ - mov $(MAX_DIRECTMAP_ADDRESS), %edi - add %ecx, %edi /* %edi = src + length */ -- shr $2,%ecx /* %ecx = length/4 */ -+ add $3,%ecx -+ shr $2,%ecx /* %ecx = (length+3)/4 */ - 1: sub $4,%eax /* %eax = src, %edi = dst */ - sub $4,%edi - mov (%eax),%ebx diff --git a/sysutils/xen12/patches/patch-ab b/sysutils/xen12/patches/patch-ab deleted file mode 100644 index 22edee2f779..00000000000 --- a/sysutils/xen12/patches/patch-ab +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2004/05/22 16:31:04 cl Exp $ - ---- drivers/scsi/aic7xxx/Makefile.orig 2004-04-18 04:29:12.000000000 +0200 -+++ drivers/scsi/aic7xxx/Makefile -@@ -7,6 +7,7 @@ - O_TARGET := aic7xxx_drv.o - - include $(BASEDIR)/Rules.mk -+CFLAGS += -D__linux__ - #CFLAGS += -I$(BASEDIR)/drivers/scsi - - #list-multi := aic7xxx.o aic79xx.o diff --git a/sysutils/xen12/patches/patch-ac b/sysutils/xen12/patches/patch-ac deleted file mode 100644 index caf714c60c2..00000000000 --- a/sysutils/xen12/patches/patch-ac +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2004/05/22 16:31:04 cl Exp $ - ---- tools/figlet/Makefile.orig 2004-04-18 04:29:16.000000000 +0200 -+++ tools/figlet/Makefile -@@ -1,7 +1,8 @@ - --CC := gcc -+#CC := gcc - - figlet: figlet.c -+ $(CC) -o figlet figlet.c - - clean: - rm -f *.o figlet diff --git a/sysutils/xen12/patches/patch-ad b/sysutils/xen12/patches/patch-ad deleted file mode 100644 index 96296cde047..00000000000 --- a/sysutils/xen12/patches/patch-ad +++ /dev/null @@ -1,32 +0,0 @@ -$NetBSD: patch-ad,v 1.1 2004/05/22 18:12:40 cl Exp $ - ---- include/xeno/config.h.orig 2004-04-18 04:29:16.000000000 +0200 -+++ include/xeno/config.h -@@ -32,6 +32,27 @@ - #define CONFIG_BLK_DEV_IDE_MODES 1 - #define CONFIG_BLK_DEV_PIIX 1 - -+// #define CONFIG_BLK_DEV_AEC62XX 1 -+// #define CONFIG_BLK_DEV_ALI15X3 1 -+// #define CONFIG_BLK_DEV_AMD74XX 1 -+// #define CONFIG_BLK_DEV_CMD64X 1 -+// #define CONFIG_BLK_DEV_CY82C693 1 -+// #define CONFIG_BLK_DEV_CS5530 1 -+// #define CONFIG_BLK_DEV_HPT34X 1 -+// #define CONFIG_BLK_DEV_HPT366 1 -+// #define CONFIG_BLK_DEV_NS87415 1 -+// #define CONFIG_BLK_DEV_OPTI621 1 -+// #define CONFIG_BLK_DEV_PDC_ADMA 1 -+#define CONFIG_BLK_DEV_PDC202XX 1 -+// #define CONFIG_BLK_DEV_IT8172 1 -+// #define CONFIG_BLK_DEV_RZ1000 1 -+#define CONFIG_BLK_DEV_SVWKS 1 -+// #define CONFIG_BLK_DEV_SIS5513 1 -+// #define CONFIG_BLK_DEV_SLC90E66 1 -+// #define CONFIG_BLK_DEV_SL82C105 1 -+// #define CONFIG_BLK_DEV_TRM290 1 -+#define CONFIG_BLK_DEV_VIA82CXXX 1 -+ - #define CONFIG_SCSI 1 - #define CONFIG_SCSI_LOGGING 1 - #define CONFIG_BLK_DEV_SD 1 diff --git a/sysutils/xentools12/DESCR b/sysutils/xentools12/DESCR deleted file mode 100644 index 38e79fc0d1c..00000000000 --- a/sysutils/xentools12/DESCR +++ /dev/null @@ -1,5 +0,0 @@ -The Xen virtual machine monitor allows running several virtual machines -on a single physical machine. The xentools12 package contains the -tools to create, destroy and control the virtual machines. - -The xentools12 package contains the tools for Xen v1.2. diff --git a/sysutils/xentools12/Makefile b/sysutils/xentools12/Makefile deleted file mode 100644 index 3658d68ce9c..00000000000 --- a/sysutils/xentools12/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# $NetBSD: Makefile,v 1.11 2008/04/25 20:39:12 joerg Exp $ -# - -DISTNAME= xeno-1.2-src-040418 -PKGNAME= xentools12-040418 -PKGREVISION= 1 -CATEGORIES= sysutils -MASTER_SITES= ftp://ftp.NetBSD.org/pub/NetBSD/arch/xen/misc/ -EXTRACT_SUFX= .tgz -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} -DISTFILES+= netbsd-xen-kernel-headers-040508.tar.gz - -MAINTAINER= cl@NetBSD.org -HOMEPAGE= http://www.NetBSD.org/ports/xen/ -COMMENT= Userland Tools for Xen - -ONLY_FOR_PLATFORM= *-*-i386 - -WRKSRC= ${WRKDIR}/xeno-1.2/tools - -PKG_SYSCONFSUBDIR?= xc12 -EGDIR= ${PREFIX}/share/examples/${PKGNAME_NOREV} -CONF_FILES= ${EGDIR}/defaults ${PKG_SYSCONFDIR}/defaults -CONF_FILES+= ${EGDIR}/democd ${PKG_SYSCONFDIR}/democd -CONF_FILES+= ${EGDIR}/netbsd ${PKG_SYSCONFDIR}/netbsd - -USE_TOOLS+= gmake -MAKE_ENV+= EGDIR=${EGDIR:Q} -MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q} -PYTHON_VERSIONS_ACCEPTED= 23 -PY_PATCHPLIST= yes -PYTHON_PATCH_SCRIPTS= examples/xc_dom_control.py examples/xc_dom_create.py -PYTHON_PATCH_SCRIPTS+= examples/xc_vd_tool.py - -.include "../../lang/python/application.mk" -.include "../../lang/python/extension.mk" - -.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/xentools12/PLIST b/sysutils/xentools12/PLIST deleted file mode 100644 index d61ffc6271b..00000000000 --- a/sysutils/xentools12/PLIST +++ /dev/null @@ -1,17 +0,0 @@ -@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:16:21 joerg Exp $ -bin/balloon -bin/xc_dom_control.py -bin/xc_dom_create.py -bin/xc_vd_tool.py -bin/xen_cpuperf -bin/xen_read_console -include/xc.h -lib/libxc.so -lib/libxc.so.1.2 -lib/libxc.so.1.2.0 -${PYSITELIB}/Xc.so -${PYSITELIB}/XenoUtil.py -${PYSITELIB}/XenoUtil.pyc -share/examples/${PKGNAME}/defaults -share/examples/${PKGNAME}/democd -share/examples/${PKGNAME}/netbsd diff --git a/sysutils/xentools12/distinfo b/sysutils/xentools12/distinfo deleted file mode 100644 index 367a17e267e..00000000000 --- a/sysutils/xentools12/distinfo +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: distinfo,v 1.3 2005/02/24 13:40:59 agc Exp $ - -SHA1 (xeno-1.2-src-040418.tgz) = d19f627dc40416f369f6728fcd86e4364e1713ee -RMD160 (xeno-1.2-src-040418.tgz) = c3fec4a6f9cc4478abb493269f163b6498dff260 -Size (xeno-1.2-src-040418.tgz) = 2960238 bytes -SHA1 (netbsd-xen-kernel-headers-040508.tar.gz) = 4e452e48b9896528a9fed580b46a072be28b807d -RMD160 (netbsd-xen-kernel-headers-040508.tar.gz) = 2296d9bacb86e4fbb9f1d838b4383bbe94ced09d -Size (netbsd-xen-kernel-headers-040508.tar.gz) = 1140 bytes -SHA1 (patch-aa) = 6c43d7b592f316f5e0bf2d2ee88a2edba03cb635 -SHA1 (patch-ab) = 130cba1d87a72a75789809561e6ab5094e843abe -SHA1 (patch-ac) = 53bfeaddecf8e9b583e7764845acab1827587348 -SHA1 (patch-ad) = 20b20b9b7e0755de90c9d126bce030d5a267fb44 -SHA1 (patch-ae) = d0b46925a02c14f551cb7612747e1f7a237ad68c -SHA1 (patch-af) = d7ca50cd38a499b6703ccae55572095165f4bc77 -SHA1 (patch-ag) = 2811168875b4c3b0af194fe0b6a95ac9be123260 -SHA1 (patch-ah) = a1523d6df5220a2915cd7ff152c3011042d7de71 -SHA1 (patch-ai) = 936a9c198f15a3e6f78a1639c70bea19338ef1d1 -SHA1 (patch-aj) = 3d567c5497b09e1b5980fe75d2bb38a23e39621d -SHA1 (patch-ak) = d4e0d09f232f9d37ab4ab93fc389b07de4d9a5da -SHA1 (patch-al) = 3ab650d2608455c603046afe46375ff3fa219703 -SHA1 (patch-am) = 90e31b894191b2a8df23344bc6997fa874f555e9 -SHA1 (patch-an) = 0351b1941ca85c016a8a09bb94ad9c126cb4af91 diff --git a/sysutils/xentools12/patches/patch-aa b/sysutils/xentools12/patches/patch-aa deleted file mode 100644 index c05a1739861..00000000000 --- a/sysutils/xentools12/patches/patch-aa +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-aa,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- balloon/Makefile.orig 2004-04-18 04:29:14.000000000 +0200 -+++ balloon/Makefile -@@ -5,8 +5,7 @@ $(TARGET): balloon.c - $(CC) -O2 -Wall -o $(TARGET) balloon.c - - install: $(TARGET) -- mkdir -p $(prefix)/usr/bin -- cp -a $(TARGET) $(prefix)/usr/bin -+ ${BSD_INSTALL_PROGRAM} $(TARGET) ${PREFIX}/bin - - dist: $(TARGET) - mkdir -p ../../../install/bin diff --git a/sysutils/xentools12/patches/patch-ab b/sysutils/xentools12/patches/patch-ab deleted file mode 100644 index 96402d73eee..00000000000 --- a/sysutils/xentools12/patches/patch-ab +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- balloon/balloon.c.orig 2004-04-18 04:29:13.000000000 +0200 -+++ balloon/balloon.c -@@ -31,7 +31,11 @@ typedef struct user_balloon_op { - - static int open_balloon_proc() - { -+#if defined(__linux__) - return open("/proc/xeno/balloon", O_RDWR); -+#elif defined(__NetBSD__) -+ return open("/kern/xen/balloon", O_RDWR); -+#endif - } - - /* inflate balloon function signals to kernel it should relinquish memory */ diff --git a/sysutils/xentools12/patches/patch-ac b/sysutils/xentools12/patches/patch-ac deleted file mode 100644 index 5bba5215666..00000000000 --- a/sysutils/xentools12/patches/patch-ac +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- examples/Makefile.orig 2004-04-18 04:29:14.000000000 +0200 -+++ examples/Makefile -@@ -12,15 +12,16 @@ ETC = defaults democd netbsd - INITD = xendomains - - all: -+ [ -f xc_dom_create.py-pre ] || ${MV} xc_dom_create.py xc_dom_create.py-pre -+ ${SED} -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g' \ -+ xc_dom_create.py-pre > xc_dom_create.py - - install: all -- mkdir -p $(prefix)/usr/bin -- cp -a $(INSTALL) $(prefix)/usr/bin -- #chmod 755 $(INSTALL) -- mkdir -p $(prefix)/etc/xc -- for i in $(ETC) ; do [ ! -e $(prefix)/etc/xc/$$i ] && echo Install $$i && cp $$i $(prefix)/etc/xc/ ; done || true -- mkdir -p $(prefix)/etc/xc/auto -- for i in $(INITD) ; do [ -e $(prefix)/etc/init.d/ ] && [ ! -e $(prefix)/etc/init.d/$$i ] && cp $$i $(prefix)/etc/init.d/ ; done || true -+ ${BSD_INSTALL_SCRIPT} $(INSTALL) ${PREFIX}/bin -+ ${BSD_INSTALL_DATA_DIR} ${EGDIR} -+ ${BSD_INSTALL_DATA} $(ETC) ${EGDIR} -+ #mkdir -p $(prefix)/etc/xc/auto -+ #for i in $(INITD) ; do [ -e $(prefix)/etc/init.d/ ] && [ ! -e $(prefix)/etc/init.d/$$i ] && cp $$i $(prefix)/etc/init.d/ ; done || true - - dist: all - mkdir -p ../../../install/bin diff --git a/sysutils/xentools12/patches/patch-ad b/sysutils/xentools12/patches/patch-ad deleted file mode 100644 index 6102f862ef4..00000000000 --- a/sysutils/xentools12/patches/patch-ad +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ad,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- examples/xc_dom_create.py.orig 2004-04-18 04:29:16.000000000 +0200 -+++ examples/xc_dom_create.py -@@ -2,7 +2,7 @@ - - import Xc, XenoUtil, string, sys, os, time, socket, getopt, signal, syslog - --config_dir = '/etc/xc/' -+config_dir = '@PKG_SYSCONFDIR@/' - config_file = xc_config_file = config_dir + 'defaults' - - def main_usage (): diff --git a/sysutils/xentools12/patches/patch-ae b/sysutils/xentools12/patches/patch-ae deleted file mode 100644 index 1d346ce70c5..00000000000 --- a/sysutils/xentools12/patches/patch-ae +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-ae,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- misc/Makefile.orig 2004-04-18 04:29:10.000000000 +0200 -+++ misc/Makefile -@@ -2,6 +2,7 @@ - CC = gcc - CFLAGS = -Wall -O3 - EXTRA_INC = -I../../xen/include -I../../xenolinux-sparse/include -I../xc/lib -+EXTRA_INC += -I../../../netbsd-xen-kernel-headers - - HDRS = $(wildcard *.h) - SRCS = $(wildcard *.c) -@@ -9,18 +10,12 @@ OBJS = $(patsubst %.c,%.o,$(SRCS)) - - TARGETS = xen_read_console xen_cpuperf - --INSTALL = $(TARGETS) xen-mkdevnodes xen_nat_enable xen-clone -+INSTALL = $(TARGETS) # xen-mkdevnodes xen_nat_enable xen-clone - - all: $(TARGETS) -- $(MAKE) -C miniterm - - install: all -- mkdir -p $(prefix)/usr/bin -- cp -a $(INSTALL) $(prefix)/usr/bin -- chmod 755 $(prefix)/usr/bin/xen-mkdevnodes -- chmod 755 $(prefix)/usr/bin/xen_nat_enable -- chmod 755 $(prefix)/usr/bin/xen-clone -- $(MAKE) -C miniterm install -+ ${BSD_INSTALL_PROGRAM} $(INSTALL) ${PREFIX}/bin - - dist: all - mkdir -p ../../../install/bin diff --git a/sysutils/xentools12/patches/patch-af b/sysutils/xentools12/patches/patch-af deleted file mode 100644 index f675467a69c..00000000000 --- a/sysutils/xentools12/patches/patch-af +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-af,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- misc/xen_cpuperf.c.orig 2004-04-18 04:29:11.000000000 +0200 -+++ misc/xen_cpuperf.c -@@ -9,7 +9,9 @@ - - #include <sys/types.h> - #include <sched.h> -+#if defined(__linux__) - #include <error.h> -+#endif - #include <stdio.h> - #include <unistd.h> - #include <stdlib.h> -@@ -217,7 +219,7 @@ int main(int argc, char **argv) - } - } - -- if ( (privfd = open("/proc/xeno/privcmd", O_RDWR)) == -1 ) -+ if ( (privfd = open(PRIVCMD_PATH, O_RDWR)) == -1 ) - { - fprintf(stderr, "Could not open privileged Xen control interface.\n"); - exit(1); diff --git a/sysutils/xentools12/patches/patch-ag b/sysutils/xentools12/patches/patch-ag deleted file mode 100644 index 1bf47932317..00000000000 --- a/sysutils/xentools12/patches/patch-ag +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-ag,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- xc/lib/Makefile.orig 2004-04-18 04:29:11.000000000 +0200 -+++ xc/lib/Makefile -@@ -6,6 +6,7 @@ SONAME = libxc.so.$(MAJOR) - CC = gcc - CFLAGS = -c -Wall -O3 - CFLAGS += -I../../../xen/include -I../../../xenolinux-sparse/include -+CFLAGS += -I../../../../netbsd-xen-kernel-headers - - HDRS = $(wildcard *.h) - OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) -@@ -23,12 +24,8 @@ check-for-zlib: - fi - - install: all -- mkdir -p $(prefix)/usr/lib -- mkdir -p $(prefix)/usr/include -- cp -a $(LIB) $(prefix)/usr/lib -- chmod 755 $(prefix)/usr/lib/$(LIB) -- cp xc.h $(prefix)/usr/include -- chmod 644 $(prefix)/usr/include/xc.h -+ ${BSD_INSTALL_PROGRAM} $(LIB) ${PREFIX}/lib -+ ${BSD_INSTALL_DATA} xc.h ${PREFIX}/include - - dist: all - mkdir -p ../../../../install/lib diff --git a/sysutils/xentools12/patches/patch-ah b/sysutils/xentools12/patches/patch-ah deleted file mode 100644 index 244eff6ee1f..00000000000 --- a/sysutils/xentools12/patches/patch-ah +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- xc/lib/xc_linux_build.c.orig 2004-04-18 04:29:15.000000000 +0200 -+++ xc/lib/xc_linux_build.c -@@ -222,6 +222,10 @@ static int setup_guestos(int xc_handle, - if ( (vl2tab = map_pfn(pm_handle, l2tab >> PAGE_SHIFT)) == NULL ) - goto error_out; - memset(vl2tab, 0, PAGE_SIZE); -+ unmap_pfn(pm_handle, vl2tab); -+ if ( (vl2tab = map_pfn_ro(pm_handle, l2tab >> PAGE_SHIFT)) == NULL ) -+ goto error_out; -+ mlock(vl2tab, PAGE_SIZE); - vl2e = vl2tab + l2_table_offset(virt_load_addr); - for ( count = 0; count < tot_pages; count++ ) - { -@@ -231,6 +235,10 @@ static int setup_guestos(int xc_handle, - if ( (vl1tab = map_pfn(pm_handle, l1tab >> PAGE_SHIFT)) == NULL ) - goto error_out; - memset(vl1tab, 0, PAGE_SIZE); -+ unmap_pfn(pm_handle, vl1tab); -+ if ( (vl1tab = map_pfn_ro(pm_handle, l1tab >> PAGE_SHIFT)) == NULL ) -+ goto error_out; -+ mlock(vl1tab, PAGE_SIZE); - alloc_index--; - - vl1e = vl1tab + l1_table_offset(virt_load_addr + diff --git a/sysutils/xentools12/patches/patch-ai b/sysutils/xentools12/patches/patch-ai deleted file mode 100644 index 69d8093da97..00000000000 --- a/sysutils/xentools12/patches/patch-ai +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ai,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- xc/lib/xc_misc.c.orig 2004-04-18 04:29:12.000000000 +0200 -+++ xc/lib/xc_misc.c -@@ -8,7 +8,7 @@ - - int xc_interface_open(void) - { -- int fd = open("/proc/xeno/privcmd", O_RDWR); -+ int fd = open(PRIVCMD_PATH, O_RDWR); - if ( fd == -1 ) - PERROR("Could not obtain handle on privileged command interface"); - return fd; diff --git a/sysutils/xentools12/patches/patch-aj b/sysutils/xentools12/patches/patch-aj deleted file mode 100644 index 514e8d5d4c7..00000000000 --- a/sysutils/xentools12/patches/patch-aj +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-aj,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- xc/lib/xc_netbsd_build.c.orig 2004-04-18 04:29:16.000000000 +0200 -+++ xc/lib/xc_netbsd_build.c -@@ -157,6 +157,10 @@ static int setup_guestos(int xc_handle, - if ( (vl2tab = map_pfn(pm_handle, l2tab >> PAGE_SHIFT)) == NULL ) - goto error_out; - memset(vl2tab, 0, PAGE_SIZE); -+ unmap_pfn(pm_handle, vl2tab); -+ if ( (vl2tab = map_pfn_ro(pm_handle, l2tab >> PAGE_SHIFT)) == NULL ) -+ goto error_out; -+ mlock(vl2tab, PAGE_SIZE); - vl2e = vl2tab + l2_table_offset(*virt_load_addr); - for ( count = 0; count < tot_pages; count++ ) - { -@@ -166,6 +170,10 @@ static int setup_guestos(int xc_handle, - if ( (vl1tab = map_pfn(pm_handle, l1tab >> PAGE_SHIFT)) == NULL ) - goto error_out; - memset(vl1tab, 0, PAGE_SIZE); -+ unmap_pfn(pm_handle, vl1tab); -+ if ( (vl1tab = map_pfn_ro(pm_handle, l1tab >> PAGE_SHIFT)) == NULL ) -+ goto error_out; -+ mlock(vl1tab, PAGE_SIZE); - alloc_index--; - - vl1e = vl1tab + l1_table_offset(*virt_load_addr + diff --git a/sysutils/xentools12/patches/patch-ak b/sysutils/xentools12/patches/patch-ak deleted file mode 100644 index 9191870df24..00000000000 --- a/sysutils/xentools12/patches/patch-ak +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- xc/lib/xc_private.c.orig 2004-04-18 04:29:09.000000000 +0200 -+++ xc/lib/xc_private.c -@@ -8,7 +8,7 @@ - - int init_pfn_mapper(void) - { -- return open("/dev/mem", O_RDWR); -+ return open("/kern/xen/machmem", O_RDWR); - } - - int close_pfn_mapper(int pm_handle) -@@ -25,6 +25,15 @@ void *map_pfn(int pm_handle, unsigned lo - return vaddr; - } - -+void *map_pfn_ro(int pm_handle, unsigned long pfn) -+{ -+ void *vaddr = mmap(NULL, PAGE_SIZE, PROT_READ, -+ MAP_SHARED, pm_handle, pfn << PAGE_SHIFT); -+ if ( vaddr == MAP_FAILED ) -+ return NULL; -+ return vaddr; -+} -+ - void unmap_pfn(int pm_handle, void *vaddr) - { - (void)munmap(vaddr, PAGE_SIZE); diff --git a/sysutils/xentools12/patches/patch-al b/sysutils/xentools12/patches/patch-al deleted file mode 100644 index 2af708a7f0c..00000000000 --- a/sysutils/xentools12/patches/patch-al +++ /dev/null @@ -1,34 +0,0 @@ -$NetBSD: patch-al,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- xc/lib/xc_private.h.orig 2004-04-18 04:29:14.000000000 +0200 -+++ xc/lib/xc_private.h -@@ -16,11 +16,21 @@ - - #include "xc.h" - -+#if defined(__linux__) - #include <asm-xeno/proc_cmd.h> -+#elif defined(__NetBSD__) -+#include <sys/xenio.h> -+#endif - #include <hypervisor-ifs/hypervisor-if.h> - #include <hypervisor-ifs/dom0_ops.h> - #include <hypervisor-ifs/vbd.h> - -+#if defined(__linux__) -+#define PRIVCMD_PATH "/proc/xeno/privcmd" -+#elif defined(__NetBSD__) -+#define PRIVCMD_PATH "/kern/xen/privcmd" -+#endif -+ - #define _PAGE_PRESENT 0x001 - #define _PAGE_RW 0x002 - #define _PAGE_USER 0x004 -@@ -149,6 +159,7 @@ static inline int do_block_io_op(int xc_ - int init_pfn_mapper(void); - int close_pfn_mapper(int pm_handle); - void *map_pfn(int pm_handle, unsigned long pfn); -+void *map_pfn_ro(int pm_handle, unsigned long pfn); - void unmap_pfn(int pm_handle, void *vaddr); - - #endif /* __XC_PRIVATE_H__ */ diff --git a/sysutils/xentools12/patches/patch-am b/sysutils/xentools12/patches/patch-am deleted file mode 100644 index 42e6ff0cfad..00000000000 --- a/sysutils/xentools12/patches/patch-am +++ /dev/null @@ -1,214 +0,0 @@ -$NetBSD: patch-am,v 1.1 2004/05/08 18:24:00 cl Exp $ - ---- xc/py/XenoUtil.py.orig 2004-04-18 04:29:13.000000000 +0200 -+++ xc/py/XenoUtil.py -@@ -25,26 +25,40 @@ except ImportError: - # on failure, just catch the error, don't do anything - pass - -+os_ifs = {'Linux' : 'eth0', 'NetBSD' : 'xennet0'} -+default_if = os_ifs[os.uname()[0]] -+ -+os_vfr_paths = {'Linux' : '/proc/xeno/vfr', 'NetBSD' : '/kern/xen/vfr'} -+vfr_path = os_vfr_paths[os.uname()[0]] -+ -+os_ipgw_cmds = {'Linux' : '/sbin/route -n', -+ 'NetBSD' : '/sbin/route -n get default'} -+ipgw_cmd = os_ipgw_cmds[os.uname()[0]] -+ -+os_ipgw_res = {'Linux' : '^\S+\s+([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)' + -+ '\s+\S+\s+\S*G.*%s.*', -+ 'NetBSD' : 'gateway:\s([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)(?:%s)?'} -+ipgw_re = os_ipgw_res[os.uname()[0]] - - ##### Networking-related functions - --def get_current_ipaddr(dev='eth0'): -+def get_current_ipaddr(dev=default_if): - """Return a string containing the primary IP address for the given -- network interface (default 'eth0'). -- """ -+ network interface (default '%s'). -+ """ % default_if - fd = os.popen( '/sbin/ifconfig ' + dev + ' 2>/dev/null' ) - lines = fd.readlines() - for line in lines: -- m = re.search( '^\s+inet addr:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).*', -+ m = re.search( '^\s+inet (?:addr:)?([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).*', - line ) - if m: - return m.group(1) - return None - --def get_current_ipmask(dev='eth0'): -+def get_current_ipmask(dev=default_if): - """Return a string containing the primary IP netmask for the given -- network interface (default 'eth0'). -- """ -+ network interface (default '%s'). -+ """ % default_if - fd = os.popen( '/sbin/ifconfig ' + dev + ' 2>/dev/null' ) - lines = fd.readlines() - for line in lines: -@@ -52,17 +66,22 @@ def get_current_ipmask(dev='eth0'): - line ) - if m: - return m.group(1) -+ m = re.search( '^.+netmask (0x[0-9a-f]+)\s', -+ line ) -+ if m: -+ a = int(m.group(1), 16) -+ return '%d.%d.%d.%d' % ( ((a>>24)&0xff), ((a>>16)&0xff), -+ ((a>>8)&0xff), (a&0xff) ) - return None - --def get_current_ipgw(dev='eth0'): -+def get_current_ipgw(dev=default_if): - """Return a string containing the IP gateway for the given -- network interface (default 'eth0'). -- """ -- fd = os.popen( '/sbin/route -n' ) -+ network interface (default '%s'). -+ """ % default_if -+ fd = os.popen( ipgw_cmd ) - lines = fd.readlines() - for line in lines: -- m = re.search( '^\S+\s+([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)' + -- '\s+\S+\s+\S*G.*' + dev + '.*', line ) -+ m = re.search( ipgw_re % dev, line ) - if m: - return m.group(1) - return None -@@ -72,7 +91,7 @@ def setup_vfr_rules_for_vif(dom,vif,addr - is expressed as a textual dotted quad, and set up appropriate routing - rules in Xen. No return value. - """ -- fd = os.open( '/proc/xeno/vfr', os.O_WRONLY ) -+ fd = os.open( vfr_path, os.O_WRONLY ) - if ( re.search( '169\.254', addr) ): - os.write( fd, 'ADD ACCEPT srcaddr=' + addr + - ' srcaddrmask=255.255.255.255' + -@@ -117,14 +136,42 @@ def check_subnet( ip, network, netmask ) - - ##### VBD-related Functions - -+# ls -l /dev/hd[a-z] /dev/sd[a-z] /dev/scd* | sed -e 's#/dev/##' -e 's#,##' -+# | awk -v ORS=" " '{print "'\''" $10 "'\'':" $5 * 256 + $6 "," }'; -+blkdev_name_to_number_dict = { -+ 'hda':768, 'hdb':832, 'hdc':5632, 'hdd':5696, 'hde':8448, -+ 'hdf':8512, 'hdg':8704, 'hdh':8768, 'hdi':14336, 'hdj':14400, -+ 'hdk':14592, 'hdl':14656, -+ 'sda':2048, 'sdb':2064, 'sdc':2080, 'sdd':2096, -+ 'sde':2112, 'sdf':2128, 'sdg':2144, 'sdh':2160, -+ 'scd0':2816, 'scd1':2817, 'scd10':2826, 'scd11':2827, -+ 'scd12':2828, 'scd13':2829, 'scd14':2830, 'scd15':2831, -+ 'scd16':2832, 'scd2':2818, 'scd3':2819, 'scd4':2820, -+ 'scd5':2821, 'scd6':2822, 'scd7':2823, 'scd8':2824, -+ 'scd9':2825 -+ } -+ - def blkdev_name_to_number(name): - """Take the given textual block-device name (e.g., '/dev/sda1', -- 'hda') and return the device number used by the OS. """ -+ 'hda') and return the device number used by Xen. """ - -- if not re.match( '/dev/', name ): -- name = '/dev/' + name -- -- return os.stat(name).st_rdev -+ m = re.search( '/dev/(.+)', name ) -+ if m: -+ name = m.group(1) -+ -+ try: -+ return blkdev_name_to_number_dict[name] -+ except KeyError: -+ pass -+ -+ m = re.search( '^(...)([0-9]+)', name ) -+ if not m: -+ return None -+ -+ try: -+ return blkdev_name_to_number_dict[m.group(1)] + int( m.group(2) ) -+ except KeyError: -+ return None - - # lookup_blkdev_partn_info( '/dev/sda3' ) - def lookup_raw_partn(partition): -@@ -137,6 +184,11 @@ def lookup_raw_partn(partition): - type: 'Disk' or identifying name for partition type - """ - -+ os_lookup = { 'Linux' : lookup_raw_partn_linux, -+ 'NetBSD' : lookup_raw_partn_netbsd } -+ return os_lookup[os.uname()[0]](partition) -+ -+def lookup_raw_partn_linux(partition): - if not re.match( '/dev/', partition ): - partition = '/dev/' + partition - -@@ -168,6 +220,37 @@ def lookup_raw_partn(partition): - - return None - -+def lookup_raw_partn_netbsd(partition): -+ m = re.search( '^(?:/dev/)?([a-z]+[0-9]+)([a-z]*)', partition ) -+ if not m: -+ return None -+ -+ drive = m.group(1) -+ partition = m.group(2) -+ -+ fd = os.popen( '/sbin/sysctl -n ' + -+ 'machdep.domain0.diskcookie.%s' % drive ) -+ try: -+ cookie = int(fd.readline()) -+ except ValueError: -+ cookie = -1 -+ fd.close() -+ -+ fd = os.popen( '/sbin/disklabel %s' % drive ) -+ lines = fd.readlines() -+ for line in lines: -+ # # size offset fstype [fsize bsize cpg/sgs] -+ # a: 80555328 9514512 4.2BSD 2048 16384 28624 -+ m = re.search( '^\s+%s:\s*([0-9]+)\s+([0-9]+)\s+' % partition, -+ line ) -+ if m: -+ return [ { 'device' : int(cookie), -+ 'start_sector' : long(m.group(2)), -+ 'nr_sectors' : long(m.group(1)), -+ 'type' : '0' } ] -+ -+ return None -+ - def lookup_disk_uname( uname ): - """Lookup a list of segments for either a physical or a virtual device. - uname [string]: name of the device in the format \'vd:id\' for a virtual -@@ -905,11 +988,12 @@ def vd_extents_validate(new_extents,new_ - vbd_ext['writeable'] = vbd['writeable'] - old_extents.append(vbd_ext) - -- ##### Now scan /proc/mounts for compile a list of extents corresponding to -+ ##### Now scan /bin/mount for compile a list of extents corresponding to - ##### any devices mounted in DOM0. This list is added on to old_extents - -- regexp = re.compile("/dev/(\S*) \S* \S* (..).*") -- fd = open('/proc/mounts', "r") -+ mount_cmd = { 'Linux' : '/bin/mount', 'NetBSD' : '/sbin/mount' } -+ regexp = re.compile("/dev/(\S*) on \S* type \S* \(([^\),]*)") -+ fd = os.popen(mount_cmd[os.uname()[0]]) - - while True: - line = fd.readline() -@@ -932,7 +1016,8 @@ def vd_extents_validate(new_extents,new_ - - # set a writeable flag as appropriate - for ext in ext_list: -- ext['writeable'] = m.group(2) == 'rw' -+ ext['writeable'] = (m.group(2) != 'ro' and -+ m.group(2) != 'read-only') - - # now we've got here, the contents of ext_list are in a - # suitable format to be added onto the old_extents list, ready diff --git a/sysutils/xentools12/patches/patch-an b/sysutils/xentools12/patches/patch-an deleted file mode 100644 index 4a81264787f..00000000000 --- a/sysutils/xentools12/patches/patch-an +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-an,v 1.1 2004/05/08 18:50:09 cl Exp $ - ---- xc/py/Makefile.orig 2004-04-18 04:29:16.000000000 +0200 -+++ xc/py/Makefile -@@ -1,17 +1,17 @@ - - all: ../lib/libxc.so.1.2.0 ../lib/xc.h -- python setup.py build -+ ${PYTHON} setup.py build - - install: all -- if [ "$(prefix)" = "" ]; then python setup.py install; \ -- else python setup.py install --root "$(prefix)"; fi -+ if [ "$(prefix)" = "" ]; then ${PYTHON} setup.py install; \ -+ else ${PYTHON} setup.py install --root "$(prefix)"; fi - - dist: all - mkdir -p ../../../../install/lib/python - for i in `find . -name 'Xc.so'` ; do \ - install --mode=755 $$i ../../../../install/lib/python/`basename $$i` ; \ - done -- python -c 'import py_compile, sys; py_compile.compile("XenoUtil.py")' -+ ${PYTHON} -c 'import py_compile, sys; py_compile.compile("XenoUtil.py")' - install --mode=444 XenoUtil.py ../../../../install/lib/python - install --mode=644 XenoUtil.pyc ../../../../install/lib/python - clean: |