summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/xen-tools/files')
-rw-r--r--app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r43
-rw-r--r--app-emulation/xen-tools/files/xen-consoles.logrotate5
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.2--as-needed.patch10
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.2-bxclobber.patch26
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.2-pushpop.patch32
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.2-test-uuid.patch17
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.2-test-xauthority.patch72
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch24
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch12
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch (renamed from app-emulation/xen-tools/files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch)0
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch (renamed from app-emulation/xen-tools/files/3.0.4_p1/xen-tools-remove-monitor-mode-from-vnc.patch)0
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.0.4_p1-vnclisten.patch13
-rw-r--r--app-emulation/xen-tools/files/xend.initd61
-rw-r--r--app-emulation/xen-tools/files/xendomains-screen.confd15
-rw-r--r--app-emulation/xen-tools/files/xendomains.confd7
-rw-r--r--app-emulation/xen-tools/files/xendomains.initd96
16 files changed, 393 insertions, 0 deletions
diff --git a/app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r4 b/app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r4
new file mode 100644
index 0000000..724d092
--- /dev/null
+++ b/app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r4
@@ -0,0 +1,3 @@
+MD5 544eab940a0734a55459d648e5c3b224 xen-3.0.2-src.tgz 4933621
+RMD160 34e4431a981891319f8a5ea0c3f604e7d8d7d7af xen-3.0.2-src.tgz 4933621
+SHA256 f18ffab16a457fa721d11933c75f8288f6958c88c2669857c7c11d5107ba2951 xen-3.0.2-src.tgz 4933621
diff --git a/app-emulation/xen-tools/files/xen-consoles.logrotate b/app-emulation/xen-tools/files/xen-consoles.logrotate
new file mode 100644
index 0000000..c644523
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-consoles.logrotate
@@ -0,0 +1,5 @@
+/var/log/xen-consoles/*.log {
+ rotate 7
+ missingok
+ compress
+}
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2--as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2--as-needed.patch
new file mode 100644
index 0000000..362e495
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.2--as-needed.patch
@@ -0,0 +1,10 @@
+--- xen-3.0.2/tools/xenmon/Makefile 2006-06-01 13:40:40.468687762 +0100
++++ xen-3.0.2/tools/xenmon/Makefile 2006-06-01 13:41:04.000000000 +0100
+@@ -43,6 +43,6 @@
+
+
+ %: %.c Makefile
+- $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl
+
+
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2-bxclobber.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-bxclobber.patch
new file mode 100644
index 0000000..8f0b561
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.2-bxclobber.patch
@@ -0,0 +1,26 @@
+# HG changeset patch
+# User vhanquez@kneesa.uk.xensource.com
+# Date Mon Apr 10 14:51:10 2006 +0000
+# Node ID bdec77028194e6f51872b66b0575ed86ad542333
+# parent: 07af1b34d4c49ac52faaff6cb315231655212316
+fix bug #609 - error: PIC register `bx' clobbered in `asm'
+
+Signed-off-by: Vincent Hanquez <vincent@xensource.com>
+
+
+--- a/tools/ioemu/hw/vga.c Mon Apr 10 14:47:51 2006 +0100
++++ b/tools/ioemu/hw/vga.c Mon Apr 10 14:51:10 2006 +0000
+@@ -1369,10 +1369,10 @@ static inline unsigned int cpuid_edx(uns
+ {
+ unsigned int eax, edx;
+
+- __asm__("cpuid"
++ __asm__("pushl %%ebx; cpuid; popl %%ebx"
+ : "=a" (eax), "=d" (edx)
+ : "0" (op)
+- : "bx", "cx");
++ : "cx");
+
+ return edx;
+ }
+
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2-pushpop.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-pushpop.patch
new file mode 100644
index 0000000..807e007
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.2-pushpop.patch
@@ -0,0 +1,32 @@
+# HG changeset patch
+# User kaf24@firebug.cl.cam.ac.uk
+# Date Mon Apr 10 17:25:42 2006 +0100
+# Node ID c89d62e7015a25a48225daa929616a5ed44205b4
+# parent: 4088dd0856a9cbc7ef050d7272e81666b7dfbcc7
+Fix push/pop usage in tools/ioemu for x86/64.
+
+Signed-off-by: Keir Fraser <keir@xensource.com>
+
+
+
+--- a/tools/ioemu/hw/vga.c Mon Apr 10 17:16:25 2006 +0100
++++ b/tools/ioemu/hw/vga.c Mon Apr 10 17:25:42 2006 +0100
+@@ -1369,10 +1369,16 @@ static inline unsigned int cpuid_edx(uns
+ {
+ unsigned int eax, edx;
+
+- __asm__("pushl %%ebx; cpuid; popl %%ebx"
++#ifdef __x86_64__
++#define __bx "rbx"
++#else
++#define __bx "ebx"
++#endif
++ __asm__("push %%"__bx"; cpuid; pop %%"__bx
+ : "=a" (eax), "=d" (edx)
+ : "0" (op)
+ : "cx");
++#undef __ebx
+
+ return edx;
+ }
+
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2-test-uuid.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-test-uuid.patch
new file mode 100644
index 0000000..b4829e4
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.2-test-uuid.patch
@@ -0,0 +1,17 @@
+# Backported from
+# http://lists.xensource.com/archives/html/xen-changelog/2006-04/msg00086.html
+
+--- tools/python/xen/xend/tests/test_uuid.py 2006-07-22 12:10:00.000000000 +1000
++++ tools/python/xen/xend/tests/test_uuid.py 2006-07-22 12:11:01.000000000 +1000
+@@ -21,9 +21,9 @@
+ self.assertEqual(uuid.toString(inp), expected)
+ self.assertEqual(uuid.fromString(expected), inp)
+
+- t([0 for _ in range(0, 16)], "00000000-00000000-00000000-00000000")
++ t([0 for _ in range(0, 16)], "00000000-0000-0000-0000-000000000000")
+ t([185, 158, 125, 206, 250, 178, 125, 57, 2, 6, 162, 74, 178, 236,
+- 196, 5], "b99e7dce-fab27d39-0206a24a-b2ecc405")
++ 196, 5], "b99e7dce-fab2-7d39-0206-a24ab2ecc405")
+
+
+ def test_suite():
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2-test-xauthority.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-test-xauthority.patch
new file mode 100644
index 0000000..c462c59
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.2-test-xauthority.patch
@@ -0,0 +1,72 @@
+# Backported from
+# http://lists.xensource.com/archives/html/xen-changelog/2006-04/msg00087.html
+
+--- tools/python/xen/xm/create.py 2006-07-22 12:50:35.000000000 +1000
++++ tools/python/xen/xm/create.py 2006-07-22 12:52:52.000000000 +1000
+@@ -850,6 +850,16 @@
+ opts.info("Started domain %s" % (dom))
+ return int(sxp.child_value(dominfo, 'domid'))
+
++def get_xauthority():
++ xauth = os.getenv("XAUTHORITY")
++ if not xauth:
++ home = os.getenv("HOME")
++ if not home:
++ import posix, pwd
++ home = pwd.getpwuid(posix.getuid())[5]
++ xauth = home + "/.Xauthority"
++ return xauth
++
+ def parseCommandLine(argv):
+ gopts.reset()
+ args = gopts.parse(argv)
+@@ -864,14 +874,7 @@
+ gopts.vals.display = os.getenv("DISPLAY")
+
+ if not gopts.vals.xauthority:
+- xauth = os.getenv("XAUTHORITY")
+- if not xauth:
+- home = os.getenv("HOME")
+- if not home:
+- import posix, pwd
+- home = pwd.getpwuid(posix.getuid())[5]
+- xauth = home + "/.Xauthority"
+- gopts.vals.xauthority = xauth
++ gopts.vals.xauthority = get_xauthority()
+
+ # Process remaining args as config variables.
+ for arg in args:
+--- tools/python/xen/xm/tests/test_create.py 2006-07-22 12:59:13.000000000 +1000
++++ tools/python/xen/xm/tests/test_create.py 2006-07-22 12:59:13.000000000 +1000
+@@ -51,6 +51,7 @@
+ 'path' : '.:/etc/xen',
+ 'builder' : 'linux',
+ 'nics' : -1,
++ 'xauthority': xen.xm.create.get_xauthority(),
+ })
+
+
+@@ -99,6 +100,7 @@
+ 'interface' : 'eth0',
+ 'path' : '.:/etc/xen',
+ 'builder' : 'linux',
++ 'xauthority': xen.xm.create.get_xauthority(),
+ })
+
+
+@@ -138,6 +140,7 @@
+ 'path' : '.:/etc/xen',
+ 'builder' : 'linux',
+ 'nics' : -1,
++ 'xauthority': xen.xm.create.get_xauthority(),
+ })
+
+
+@@ -188,6 +191,7 @@
+ 'dhcp' : 'off',
+ 'interface' : 'eth0',
+ 'path' : '.:/etc/xen',
++ 'xauthority': xen.xm.create.get_xauthority(),
+ })
+
+
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch
new file mode 100644
index 0000000..af51c3d
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch
@@ -0,0 +1,24 @@
+--- tools/libxc/xc_ptrace.c-orig 2006-10-13 15:53:29.000000000 +1000
++++ tools/libxc/xc_ptrace.c 2006-10-13 15:54:06.000000000 +1000
+@@ -597,17 +597,13 @@
+ online_vcpus_changed(cpumap);
+ break;
+
+- case PTRACE_SETFPREGS:
+- case PTRACE_SETFPXREGS:
+- case PTRACE_PEEKUSER:
+- case PTRACE_POKEUSER:
+- case PTRACE_SYSCALL:
+- case PTRACE_KILL:
+- goto out_unspported; /* XXX not yet supported */
+-
+ case PTRACE_TRACEME:
+ printf("PTRACE_TRACEME is an invalid request under Xen\n");
+ goto out_error;
++
++ default:
++ goto out_unspported; /* XXX not yet supported */
++
+ }
+
+ return retval;
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch
new file mode 100644
index 0000000..8243ac8
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch
@@ -0,0 +1,12 @@
+diff -rpuN xen-3.0.4_1-src.orig/tools/xenmon/Makefile xen-3.0.4_1-src/tools/xenmon/Makefile
+--- xen-3.0.4_1-src.orig/tools/xenmon/Makefile 2007-01-08 15:00:51.000000000 +0000
++++ xen-3.0.4_1-src/tools/xenmon/Makefile 2007-02-09 01:02:08.000000000 +0000
+@@ -42,6 +42,6 @@ clean:
+
+
+ %: %.c Makefile
+- $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl
+ xentrace_%: %.c Makefile
+- $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl
diff --git a/app-emulation/xen-tools/files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch
index e830de5..e830de5 100644
--- a/app-emulation/xen-tools/files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch
diff --git a/app-emulation/xen-tools/files/3.0.4_p1/xen-tools-remove-monitor-mode-from-vnc.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch
index 07e9735..07e9735 100644
--- a/app-emulation/xen-tools/files/3.0.4_p1/xen-tools-remove-monitor-mode-from-vnc.patch
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch
diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-vnclisten.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-vnclisten.patch
new file mode 100644
index 0000000..a22bebe
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-vnclisten.patch
@@ -0,0 +1,13 @@
+diff -rpuN xen-3.0.4_1-src.orig/tools/python/xen/xend/XendConfig.py xen-3.0.4_1-src/tools/python/xen/xend/XendConfig.py
+--- xen-3.0.4_1-src.orig/tools/python/xen/xend/XendConfig.py Mon Dec 11 15:06:53 2006 +0000
++++ xen-3.0.4_1-src/tools/python/xen/xend/XendConfig.py Tue Jan 30 13:36:15 2007 -0500
+@@ -229,7 +229,8 @@ LEGACY_IMAGE_CFG = [
+ ('sdl', int),
+ ('vncdisplay', int),
+ ('vncunused', int),
+- ('vncpasswd', str),
++ ('vncpasswd', str),
++ ('vnclisten', str),
+ ]
+
+ LEGACY_IMAGE_HVM_CFG = [
diff --git a/app-emulation/xen-tools/files/xend.initd b/app-emulation/xen-tools/files/xend.initd
new file mode 100644
index 0000000..7c24793
--- /dev/null
+++ b/app-emulation/xen-tools/files/xend.initd
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="start stop status restart"
+
+depend() {
+ need net
+ before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
+}
+
+await_daemons_up() {
+ for ((i=0; i<5; i++)); do
+ sleep 1
+ /usr/sbin/xend status && return 0
+ done
+ return 1
+}
+
+is_privileged_domain() {
+ grep -qsE '^control_d$' /proc/xen/capabilities
+ return $?
+}
+
+start() {
+ if is_privileged_domain ; then
+ ebegin "Starting Xen control daemon"
+ /usr/sbin/xend start
+ /usr/sbin/xend status || await_daemons_up
+ eend $?
+ else
+ eerror "Can't start xend - this is not a privileged domain."
+ return 1
+ fi
+}
+
+stop() {
+ if [ "$(xm list | wc -l)" -gt 2 ]; then
+ ebegin " Stopping all domains"
+ /usr/sbin/xm shutdown --all --wait >/dev/null
+ eend $?
+ fi
+
+ ebegin "Stopping Xen control daemon"
+ /usr/sbin/xend stop
+ eend $?
+
+ # This needs more testing (bug #149321)
+ #ebegin "Stopping xenconsoled"
+ #kill $(</var/run/xenconsoled.pid)
+ #eend $?
+
+ #ebegin "Stopping xenstored"
+ #kill $(</var/run/xenstore.pid)
+ #eend $?
+}
+
+status() {
+ is_privileged_domain && /usr/sbin/xend status
+}
diff --git a/app-emulation/xen-tools/files/xendomains-screen.confd b/app-emulation/xen-tools/files/xendomains-screen.confd
new file mode 100644
index 0000000..1482c0a
--- /dev/null
+++ b/app-emulation/xen-tools/files/xendomains-screen.confd
@@ -0,0 +1,15 @@
+# When SCREEN="yes", domains in AUTODIR have their consoles connected to a
+# screen session named SCREEN_NAME, with output logged to individual files
+# named after each domain and written to /var/log/xen-consoles/ . These files
+# are rotated (using app-admin/logrotate) every time xendomains is started.
+
+SCREEN="yes"
+SCREEN_NAME="xen"
+
+# Number of seconds between writes to screen's logfiles.
+#
+# Lower values mean more disk activity and hence a possible performance
+# impact, but higher values mean a greater chance of loosing some output
+# in the event of a crash.
+
+SCREEN_LOG_INTERVAL="1"
diff --git a/app-emulation/xen-tools/files/xendomains.confd b/app-emulation/xen-tools/files/xendomains.confd
new file mode 100644
index 0000000..f1d810d
--- /dev/null
+++ b/app-emulation/xen-tools/files/xendomains.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/xendomains
+
+# Directory of domains to boot. AUTODIR should contain one or more symlinks
+# to domain config files in /etc/xen
+
+AUTODIR=/etc/xen/auto
+
diff --git a/app-emulation/xen-tools/files/xendomains.initd b/app-emulation/xen-tools/files/xendomains.initd
new file mode 100644
index 0000000..6b408f9
--- /dev/null
+++ b/app-emulation/xen-tools/files/xendomains.initd
@@ -0,0 +1,96 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="start stop status restart"
+
+depend() {
+ need xend
+ after dhcp
+}
+
+get_domname() {
+ local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
+
+ if [[ -z ${name_from_file} ]] ; then
+ basename "${1}"
+ else
+ echo ${name_from_file}
+ fi
+}
+
+is_running() {
+ /usr/sbin/xm list "${1}" >/dev/null 2>&1
+}
+
+using_screen() {
+ [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]]
+}
+
+set_screen_cmd() {
+ screen_cmd="screen -q -r ${SCREEN_NAME:=xen} -X"
+}
+
+start() {
+ set_screen_cmd
+
+ einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}"
+ if using_screen ; then
+ ebegin "Creating screen session to hold domain consoles"
+ ( screen -d -m -S ${SCREEN_NAME} -t dom0 \
+ && ${screen_cmd} zombie dr \
+ && logrotate -f /etc/xen/xen-consoles.logrotate \
+ && ${screen_cmd} logfile /var/log/xen-consoles/%t.log \
+ && ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \
+ && ${screen_cmd} log on \
+ && ${screen_cmd} deflog on ) >/dev/null
+ if [[ $? -ne 0 ]] ; then
+ eend 1
+ return 1
+ else
+ eend
+ fi
+ fi
+ # Create all domains with config files in AUTODIR.
+ for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do
+ name=$(get_domname ${dom})
+ if ! is_running ${name} ; then
+ ebegin " Starting domain ${name}"
+ if using_screen ; then
+ ${screen_cmd} screen -t ${name} xm create ${dom} -c
+ else
+ xm create --quiet ${dom}
+ fi
+ eend $?
+ else
+ einfo " Not starting domain ${name} - already running"
+ fi
+ done
+}
+
+stop() {
+ set_screen_cmd
+
+ einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}"
+ # Stop all domains with config files in AUTODIR.
+ for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do
+ name=$(get_domname ${dom})
+ if is_running ${name} ; then
+ ebegin " Stopping domain ${name}"
+ xm shutdown --wait ${name} >/dev/null
+ eend $?
+ else
+ einfo " Not stopping domain ${name} - not running"
+ fi
+ done
+ if using_screen ; then
+ ebegin "Closing screen session ${SCREEN_NAME}"
+ ${screen_cmd} quit
+ eend $?
+ fi
+}
+
+status() {
+ /usr/sbin/xm list
+}