summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Marineau <marineam@gentoo.org>2007-08-24 23:21:53 +0000
committerMichael Marineau <marineam@gentoo.org>2007-08-24 23:21:53 +0000
commit37383ebb8bc5e8a673147eee44674b51d15c6bdf (patch)
tree72ae9417278bcfe0ab55c86da8c71d2056ee55b6 /app-emulation
parentCopy Xen 3.1.0 ebuilds over from the Xen project overlay. (diff)
downloadgentoo-2-37383ebb8bc5e8a673147eee44674b51d15c6bdf.tar.gz
gentoo-2-37383ebb8bc5e8a673147eee44674b51d15c6bdf.tar.bz2
gentoo-2-37383ebb8bc5e8a673147eee44674b51d15c6bdf.zip
Copy Xen 3.1.0 ebuilds over from the Xen project overlay.
(Portage version: 2.1.2.2)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/xen-tools/ChangeLog17
-rw-r--r--app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r43
-rw-r--r--app-emulation/xen-tools/files/digest-xen-tools-3.1.03
-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-pygrub-progsreiserfs-0.3.1.patch56
-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.1.0-python-site-packages.patch31
-rw-r--r--app-emulation/xen-tools/files/xend-init42
-rw-r--r--app-emulation/xen-tools/xen-tools-3.1.0.ebuild (renamed from app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild)130
13 files changed, 117 insertions, 346 deletions
diff --git a/app-emulation/xen-tools/ChangeLog b/app-emulation/xen-tools/ChangeLog
index 373e0f489882..733e75ea33c3 100644
--- a/app-emulation/xen-tools/ChangeLog
+++ b/app-emulation/xen-tools/ChangeLog
@@ -1,6 +1,21 @@
# ChangeLog for app-emulation/xen-tools
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.24 2007/07/10 17:28:02 marineam Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.25 2007/08/24 23:21:52 marineam Exp $
+
+*xen-tools-3.1.0 (24 Aug 2007)
+
+ 24 Aug 2007; Michael Marineau <marineam@gentoo.org>
+ -files/xen-tools-3.0.2--as-needed.patch,
+ -files/xen-tools-3.0.2-bxclobber.patch,
+ -files/xen-tools-3.0.2-pushpop.patch,
+ -files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch,
+ -files/xen-tools-3.0.2-test-uuid.patch,
+ -files/xen-tools-3.0.2-test-xauthority.patch,
+ -files/xen-tools-3.0.2-xc_ptrace.patch,
+ +files/xen-tools-3.1.0-python-site-packages.patch, -files/xend-init,
+ -xen-tools-3.0.2-r4.ebuild, +xen-tools-3.1.0.ebuild:
+ Copy Xen 3.1.0 related ebuilds over from the Xen project overlay.
+ Remove Xen 3.0.2.
10 Jul 2007; Michael Marineau <marineam@gentoo.org>
xen-tools-3.0.4_p1.ebuild:
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
deleted file mode 100644
index 724d092d5489..000000000000
--- a/app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r4
+++ /dev/null
@@ -1,3 +0,0 @@
-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/digest-xen-tools-3.1.0 b/app-emulation/xen-tools/files/digest-xen-tools-3.1.0
new file mode 100644
index 000000000000..e436de9ac59e
--- /dev/null
+++ b/app-emulation/xen-tools/files/digest-xen-tools-3.1.0
@@ -0,0 +1,3 @@
+MD5 b7ae1f652b071862ae4c90b72d549627 xen-3.1.0-src.tgz 6831094
+RMD160 2fd65a3b81e522d0ed2d62fd11e5977167f1ceb3 xen-3.1.0-src.tgz 6831094
+SHA256 b5d7cea6deeee1439e8883fed4b3f1a8e4f675b4af8148178721f99bd76676b7 xen-3.1.0-src.tgz 6831094
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
deleted file mode 100644
index 362e49580dfa..000000000000
--- a/app-emulation/xen-tools/files/xen-tools-3.0.2--as-needed.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
deleted file mode 100644
index 8f0b5611f526..000000000000
--- a/app-emulation/xen-tools/files/xen-tools-3.0.2-bxclobber.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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
deleted file mode 100644
index 807e007a6aa8..000000000000
--- a/app-emulation/xen-tools/files/xen-tools-3.0.2-pushpop.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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-pygrub-progsreiserfs-0.3.1.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch
deleted file mode 100644
index 2132a6378711..000000000000
--- a/app-emulation/xen-tools/files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-diff -urN xen-3.0.2/tools/pygrub/src/fsys/reiser/reisermodule.c xen-3.0.2-b/tools/pygrub/src/fsys/reiser/reisermodule.c
---- xen-3.0.2/tools/pygrub/src/fsys/reiser/reisermodule.c 2006-04-09 18:05:53.000000000 -0400
-+++ xen-3.0.2-b/tools/pygrub/src/fsys/reiser/reisermodule.c 2006-08-18 12:51:42.000000000 -0400
-@@ -17,7 +17,7 @@
- #include <stdlib.h>
- #include <stdio.h>
-
--#include <dal/file_dal.h>
-+#include <dal/file.h>
- #include <reiserfs/reiserfs.h>
-
- #if (PYTHON_API_VERSION >= 1011)
-@@ -46,8 +46,7 @@
-
- if (!dal) return;
-
-- close((int)(unsigned long)dal->dev);
-- dal_free(dal);
-+ dal_close(dal);
- }
-
- /* reiser file object */
-@@ -195,7 +194,7 @@
- if (fs->fs != NULL)
- {
- reiserfs_fs_close(fs->fs);
-- file_dal_close(fs->dal);
-+ file_close(fs->dal);
- fs->fs = NULL;
- }
- Py_INCREF(Py_None);
-@@ -218,13 +217,13 @@
- return NULL;
- }
-
-- if (!(dal = file_dal_open(name, block_size, O_RDONLY))) {
-+ if (!(dal = file_open(name, block_size, O_RDONLY))) {
- PyErr_SetString(PyExc_ValueError, "Couldn't create device abstraction");
- return NULL;
- }
-
- if (!(rfs = reiserfs_fs_open_fast(dal, dal))) {
-- file_dal_close(dal);
-+ file_close(dal);
- PyErr_SetString(PyExc_ValueError, "unable to open file");
- return NULL;
- }
-@@ -265,7 +264,7 @@
- if (fs->fs != NULL)
- {
- reiserfs_fs_close(fs->fs);
-- file_dal_close(fs->dal);
-+ file_close(fs->dal);
- fs->fs = NULL;
- }
- PyObject_DEL(fs);
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
deleted file mode 100644
index b4829e491eb2..000000000000
--- a/app-emulation/xen-tools/files/xen-tools-3.0.2-test-uuid.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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
deleted file mode 100644
index c462c59db9ed..000000000000
--- a/app-emulation/xen-tools/files/xen-tools-3.0.2-test-xauthority.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-# 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
deleted file mode 100644
index af51c3d88a77..000000000000
--- a/app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- 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.1.0-python-site-packages.patch b/app-emulation/xen-tools/files/xen-tools-3.1.0-python-site-packages.patch
new file mode 100644
index 000000000000..ea5a2177b6a0
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.1.0-python-site-packages.patch
@@ -0,0 +1,31 @@
+With xen-3.1.0 on Pardus 2007, "/usr/sbin/xend start" returns "Cannot find Xen
+Python modules." cause Xen Python modules installed
+into "/usr/lib/python2.4/site-packages/"
+
+Following patch adds site-packages into search path
+
+Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
+
+diff -r aee991c7723a tools/misc/xen-python-path
+--- a/tools/misc/xen-python-path Wed May 09 16:34:47 2007 +0100
++++ b/tools/misc/xen-python-path Sat May 19 02:24:24 2007 +0300
+@@ -30,12 +30,13 @@ import sys
+
+ for p in ['python%s' % sys.version[:3], 'python']:
+ for l in ['/usr/lib64', '/usr/lib']:
+- d = os.path.join(l, p)
+- if os.path.exists(os.path.join(d, AUXBIN)):
+- sys.path.append(d)
+- import xen.util.auxbin
+- print os.path.join(xen.util.auxbin.libpath(), p)
+- sys.exit(0)
++ for k in ['', 'site-packages/']:
++ d = os.path.join(l, p, k)
++ if os.path.exists(os.path.join(d, AUXBIN)):
++ sys.path.append(d)
++ import xen.util.auxbin
++ print os.path.join(xen.util.auxbin.libpath(), p)
++ sys.exit(0)
+
+ print >>sys.stderr, "Cannot find Xen Python modules."
+ sys.exit(1)
diff --git a/app-emulation/xen-tools/files/xend-init b/app-emulation/xen-tools/files/xend-init
deleted file mode 100644
index 891ab66b9b4b..000000000000
--- a/app-emulation/xen-tools/files/xend-init
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend-init,v 1.1 2006/03/24 23:55:01 agriffis Exp $
-
-opts="start stop status restart"
-
-depend() {
- need net
- before xendomains sshd 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
-}
-
-start() {
- ebegin "Starting Xen control daemon"
- /usr/sbin/xend start
- /usr/sbin/xend status || await_daemons_up
- eend $?
-}
-
-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 $?
-}
-
-status() {
- /usr/sbin/xend status
-}
diff --git a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-3.1.0.ebuild
index d683d167ef67..fcbddc04239c 100644
--- a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-3.1.0.ebuild
@@ -1,24 +1,22 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild,v 1.5 2007/07/12 06:39:56 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.1.0.ebuild,v 1.1 2007/08/24 23:21:52 marineam Exp $
-inherit mount-boot flag-o-matic distutils eutils multilib
+inherit flag-o-matic distutils eutils multilib
DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.sourceforge.net"
-SRC_URI="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-${PV}-src.tgz"
-S="${WORKDIR}/xen-${PV}"
+HOMEPAGE="http://www.xensource.com/xen/xen/"
+SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/src.tgz/xen-${PV}-src.tgz"
+S="${WORKDIR}/xen-${PV}-src"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="doc debug screen custom-cflags pygrub vnc sdl"
+IUSE="doc debug screen custom-cflags pygrub hvm"
CDEPEND="dev-lang/python
sys-libs/zlib
- sdl? ( media-libs/libsdl )
- vnc? ( media-libs/libsdl )
- pygrub? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )"
+ hvm? ( media-libs/libsdl )"
DEPEND="${CDEPEND}
sys-devel/gcc
@@ -28,10 +26,13 @@ DEPEND="${CDEPEND}
dev-tex/latex2html
media-gfx/transfig
)
- vnc? ( net-libs/libvncserver )"
+ hvm? (
+ x11-proto/xproto
+ net-libs/libvncserver
+ sys-devel/dev86
+ )"
RDEPEND="${CDEPEND}
- ~app-emulation/xen-${PV}
sys-apps/iproute2
net-misc/bridge-utils
screen? (
@@ -42,14 +43,19 @@ RDEPEND="${CDEPEND}
PYTHON_MODNAME="xen grub"
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
+
pkg_setup() {
- if use vnc && ! use sdl ; then
- ewarn "You have the 'vnc' USE flag set, but not 'sdl'."
- ewarn "VNC functionality requires SDL support, so it"
- ewarn "will be enabled anyway."
+ if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
+ eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
+ eerror "an amd64 multilib profile is required. Remove the hvm use flag"
+ eerror "to build xen-tools on your current profile."
+ die "USE=hvm is unsupported on this system."
fi
- if [[ "$(scanelf -s __guard -q `type -P python`)" ]] ; then
+ if [[ "$(scanelf -s __guard -q `which python`)" ]] ; then
ewarn "xend may not work when python is built with stack smashing protection (ssp)."
ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
fi
@@ -82,63 +88,39 @@ src_unpack() {
-i {} \;
fi
- # xen tries to be smart and filter out CFLAGs not supported by gcc.
- # It doesn't handle no* flags though, but flag-o-matic's test-flag-CC does.
- for FLAG in -nopie -fno-stack-protector -fno-stack-protector-all; do
- test-flag-CC ${FLAG} && HARDFLAGS="${HARDFLAGS} ${FLAG}"
- done
- sed -i "s/^CFLAGS :=$/& ${HARDFLAGS}/" \
- "${S}"/tools/firmware/{hvmloader,vmxassist}/Makefile
-
- # Disable the 32bit-only vmxassist if we are not on x86
- # and we don't support the x86 ABI
- if ! use x86 && ! has x86 $(get_all_abis); then
- sed -i -e "/SUBDIRS += vmxassist/d" "${S}"tools/firmware/Makefile
+ # Disable hvm support on systems that don't support x86_32 binaries.
+ if ! use hvm; then
+ chmod 644 tools/check/check_x11_devel
+ sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
+ sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
fi
- if use pygrub; then
- # Upstream use Debian and hence progsreiserfs-0.3.0,
- # which has a different API to 0.3.1
- epatch "${FILESDIR}/${P}"-pygrub-progsreiserfs-0.3.1.patch
- else
- sed -i -e "/^SUBDIRS += pygrub$/d" "${S}"/tools/Makefile
+ if ! use pygrub; then
+ sed -i -e "/^SUBDIRS-y += pygrub$/d" "${S}"/tools/Makefile
fi
- # Fixes for hardened and amd64
- epatch "${FILESDIR}"/${P}-bxclobber.patch
- epatch "${FILESDIR}"/${P}-pushpop.patch
-
# Allow --as-needed LDFLAGS
- epatch "${FILESDIR}/${P}"--as-needed.patch
-
- # Allow building with python-2.5 (bug #149138)
- # Backported from upstream - should be in 3.0.3
- sed -i 's/\.2|^2\.3|^2\.4/.[2345]/' "${S}"/tools/check/check_python
+ epatch "${FILESDIR}/${PN}-3.0.4_p1--as-needed.patch"
- # Fix upstream's broken test cases (bug #141233)
- epatch "${FILESDIR}/${P}"-test-uuid.patch
- epatch "${FILESDIR}/${P}"-test-xauthority.patch
+ # Fix network broadcast on bridged networks
+ epatch "${FILESDIR}/${PN}-3.0.4_p1-network-bridge-broadcast.patch"
- # Fix compilation error with newer glibc (bug #151014)
- # Backported from upstream - should be in 3.0.3
- epatch "${FILESDIR}/${P}"-xc_ptrace.patch
+ # Also look in python's site packages for xen, as it installs there
+ epatch "${FILESDIR}/${PN}-3.1.0-python-site-packages.patch"
}
src_compile() {
local myopt myconf
use debug && myopt="${myopt} debug=y"
- myconf="${myconf} $(use_enable vnc)"
- if use vnc ; then
- myconf="${myconf} --enable-sdl"
- else
- myconf="${myconf} $(use_enable sdl)"
- fi
-
use custom-cflags || unset CFLAGS
- gcc-specs-ssp && append-flags -fno-stack-protector -fno-stack-protector-all
+ #gcc-specs-ssp && append-flags -fno-stack-protector -fno-stack-protector-all
+
+ if use hvm; then
+ myconf="${myconf} --disable-system --disable-user"
+ (cd tools/ioemu && econf ${myconf}) || die "configure failured"
+ fi
- (cd tools/ioemu && econf ${myconf}) || die "configure failured"
emake -C tools ${myopt} || die "compile failed"
if use doc; then
@@ -152,7 +134,7 @@ src_compile() {
src_install() {
local myopt="XEN_PYTHON_NATIVE_INSTALL=1"
- make DESTDIR="${D}" ${myopt} install-tools \
+ make DESTDIR="${D}" -C tools ${myopt} install \
|| die "install failed"
# Remove RedHat-specific stuff
@@ -166,9 +148,12 @@ src_install() {
doman docs/man?/*
- newinitd "${FILESDIR}"/xend.initd xend
- newconfd "${FILESDIR}"/xendomains.confd xendomains
- newinitd "${FILESDIR}"/xendomains.initd xendomains
+ newinitd "${FILESDIR}"/xend.initd xend \
+ || die "Couldn't install xen.initd"
+ newconfd "${FILESDIR}"/xendomains.confd xendomains \
+ || die "Couldn't install xendomains.confd"
+ newinitd "${FILESDIR}"/xendomains.initd xendomains \
+ || die "Couldn't install xendomains.initd"
if use screen; then
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
@@ -177,19 +162,38 @@ src_install() {
fi
# xend expects these to exist
- keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump
+ keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
+
+ # for xendomains
+ keepdir /etc/xen/auto
}
pkg_postinst() {
elog "Please visit the Xen and Gentoo wiki:"
elog "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
+ if [[ "$(scanelf -s __guard -q `which python`)" ]] ; then
+ echo
+ ewarn "xend may not work when python is built with stack smashing protection (ssp)."
+ ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
+ ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
+ fi
+
if ! built_with_use dev-lang/python ncurses; then
echo
ewarn "NB: Your dev-lang/python is built without USE=ncurses."
ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
fi
+ if ! use hvm; then
+ echo
+ elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+ elog "support enable the hvm use flag."
+ elog "An x86 or amd64 multilib system is required to build HVM support."
+ echo
+ elog "The ioemu use flag has been removed and replaced with hvm."
+ fi
+
if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
echo
elog "xensv is broken upstream (Gentoo bug #142011)."