diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2007-06-10 06:07:02 +0000 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2007-06-10 06:07:02 +0000 |
commit | f6c0a7f3a038d0022c6d8164116e9aee89e1b589 (patch) | |
tree | bf93a7b16a3380cf69c5533ebf16e855a042149b /app-emulation | |
parent | Add more Xen-related stuff. (diff) | |
download | gentoo-2-f6c0a7f3a038d0022c6d8164116e9aee89e1b589.tar.gz gentoo-2-f6c0a7f3a038d0022c6d8164116e9aee89e1b589.tar.bz2 gentoo-2-f6c0a7f3a038d0022c6d8164116e9aee89e1b589.zip |
Add Python modules for starting virtualized guest installations.
(Portage version: 2.1.2.7)
Diffstat (limited to 'app-emulation')
10 files changed, 328 insertions, 0 deletions
diff --git a/app-emulation/virtinst/ChangeLog b/app-emulation/virtinst/ChangeLog new file mode 100644 index 000000000000..cfbca610a682 --- /dev/null +++ b/app-emulation/virtinst/ChangeLog @@ -0,0 +1,15 @@ +# ChangeLog for app-emulation/virtinst +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtinst/ChangeLog,v 1.1 2007/06/10 06:07:02 dberkholz Exp $ + +*virtinst-0.103.0 (10 Jun 2007) + + 10 Jun 2007; Donnie Berkholz <dberkholz@gentoo.org>; + +files/virtinst-0.103.0-accelerate.patch, + +files/virtinst-0.103.0-default-net.patch, + +files/virtinst-0.103.0-features-xml.patch, + +files/virtinst-0.103.0-rhel5-client.patch, + +files/virtinst-0.103.0-urlgrabber-import.patch, +metadata.xml, + +virtinst-0.103.0.ebuild: + Add Python modules for starting virtualized guest installations. + diff --git a/app-emulation/virtinst/Manifest b/app-emulation/virtinst/Manifest new file mode 100644 index 000000000000..be0dd7ab0eab --- /dev/null +++ b/app-emulation/virtinst/Manifest @@ -0,0 +1,36 @@ +AUX virtinst-0.103.0-accelerate.patch 886 RMD160 cc2f9fab181b7d01cab283d295baba3814d50915 SHA1 2cb1cb3f6a58bdc6ed831708cf768f072210b18a SHA256 5342dbd2950d2d1968f27bece745e84d3c845afb10d81d644f05f136b3a1d6cd +MD5 7c361b62cf636a0ae018ccdd346a531d files/virtinst-0.103.0-accelerate.patch 886 +RMD160 cc2f9fab181b7d01cab283d295baba3814d50915 files/virtinst-0.103.0-accelerate.patch 886 +SHA256 5342dbd2950d2d1968f27bece745e84d3c845afb10d81d644f05f136b3a1d6cd files/virtinst-0.103.0-accelerate.patch 886 +AUX virtinst-0.103.0-default-net.patch 4782 RMD160 d85f97c98819fd62284c3860eae688d71aeb39d2 SHA1 4ad5cad9ad919353ee4f537eb42b45fca09a59e3 SHA256 d2975dd6046d21c61627407c78335413d7235f7158fea8d13b3fc547c96fb64d +MD5 5d2840dc7ed888fb5b6447b25b9f0c94 files/virtinst-0.103.0-default-net.patch 4782 +RMD160 d85f97c98819fd62284c3860eae688d71aeb39d2 files/virtinst-0.103.0-default-net.patch 4782 +SHA256 d2975dd6046d21c61627407c78335413d7235f7158fea8d13b3fc547c96fb64d files/virtinst-0.103.0-default-net.patch 4782 +AUX virtinst-0.103.0-features-xml.patch 1014 RMD160 4f66159b2ba69446bf743e61dc6fc37049ab0b25 SHA1 15d61a2b03dc2073f8125d7e29e47975c406d689 SHA256 4810f30da026d8875856ac15233a9ab7bcd868a49d49fe07b2db9f98d393e2ca +MD5 f005bc2fabcf6cfafbab585a6a19e6df files/virtinst-0.103.0-features-xml.patch 1014 +RMD160 4f66159b2ba69446bf743e61dc6fc37049ab0b25 files/virtinst-0.103.0-features-xml.patch 1014 +SHA256 4810f30da026d8875856ac15233a9ab7bcd868a49d49fe07b2db9f98d393e2ca files/virtinst-0.103.0-features-xml.patch 1014 +AUX virtinst-0.103.0-rhel5-client.patch 990 RMD160 a6bc46e0f3c987b34b9b704ed6a70a5191c1111c SHA1 aa62b100f916d4cc59489ea451d429a673a1bfca SHA256 e1a655e256ee570292ff87f95728147e32a9ff9b5905606027e115b8ec9051f9 +MD5 c8c9169f3d6d38f8e681ea87e95d45bb files/virtinst-0.103.0-rhel5-client.patch 990 +RMD160 a6bc46e0f3c987b34b9b704ed6a70a5191c1111c files/virtinst-0.103.0-rhel5-client.patch 990 +SHA256 e1a655e256ee570292ff87f95728147e32a9ff9b5905606027e115b8ec9051f9 files/virtinst-0.103.0-rhel5-client.patch 990 +AUX virtinst-0.103.0-urlgrabber-import.patch 318 RMD160 351a718427e31f1d23dc9f8bcaf53dad75e8d3a9 SHA1 fe9b9743e98c74169f0b3dbe104b852390e56dc1 SHA256 08b66d1314f6d0e23f863928041f3506c878aa4887f1e47d41ae40e9927d8373 +MD5 ef45143bf59cf1f949f01a9ba3720f96 files/virtinst-0.103.0-urlgrabber-import.patch 318 +RMD160 351a718427e31f1d23dc9f8bcaf53dad75e8d3a9 files/virtinst-0.103.0-urlgrabber-import.patch 318 +SHA256 08b66d1314f6d0e23f863928041f3506c878aa4887f1e47d41ae40e9927d8373 files/virtinst-0.103.0-urlgrabber-import.patch 318 +DIST python-virtinst-0.103.0-3.fc7.src.rpm 55048 RMD160 c0980d48db8431d00ffc1f94e63890e55b3c0d13 SHA1 45ec655a06cde71ce11d70f8916a46b3b149a370 SHA256 6ddceddb6f23312a73e8bc8aae79b88d9f205a026dcda4bdd3314ffd4002c858 +EBUILD virtinst-0.103.0.ebuild 1090 RMD160 85f02ca73ea1dbce37479c8b9d837fa3f80ff3ec SHA1 729b3bd49ccfdb0037c74ce75623851e78edc6d6 SHA256 5ccf63f846b898df673514308cfa98164d87f411d1c495f3c3b5c9cce8780b34 +MD5 e73db1aafe3ad755759b63222575d060 virtinst-0.103.0.ebuild 1090 +RMD160 85f02ca73ea1dbce37479c8b9d837fa3f80ff3ec virtinst-0.103.0.ebuild 1090 +SHA256 5ccf63f846b898df673514308cfa98164d87f411d1c495f3c3b5c9cce8780b34 virtinst-0.103.0.ebuild 1090 +MISC ChangeLog 554 RMD160 23ba92d013e233eb716f066f2642e4b7b4c08b7d SHA1 2631069cf2dcba2ec71783803c21a44043c81173 SHA256 135f0a34f4a5f70a686cfa5f9a8fe1679c8e30989c7b1401413c5e4b0795cdf6 +MD5 0cc95e23ab7ce46a6628c12165daa9d2 ChangeLog 554 +RMD160 23ba92d013e233eb716f066f2642e4b7b4c08b7d ChangeLog 554 +SHA256 135f0a34f4a5f70a686cfa5f9a8fe1679c8e30989c7b1401413c5e4b0795cdf6 ChangeLog 554 +MISC metadata.xml 233 RMD160 0743ec2c29794537113abedcf04d5c01fa6d54a1 SHA1 3f603e207f4f8a97e81865afce1c52236c3d3006 SHA256 85708db8b459e68ad4d99ef2d64375e01acf4f1c4ad87ece2a363a92a0dfb763 +MD5 e98affdc6a49342e9482013fb49ca332 metadata.xml 233 +RMD160 0743ec2c29794537113abedcf04d5c01fa6d54a1 metadata.xml 233 +SHA256 85708db8b459e68ad4d99ef2d64375e01acf4f1c4ad87ece2a363a92a0dfb763 metadata.xml 233 +MD5 283cc270e005ea158f93685c9d73acd7 files/digest-virtinst-0.103.0 289 +RMD160 4dbcc40bc2925cae58268e16cce6412920788ece files/digest-virtinst-0.103.0 289 +SHA256 fb38626e8d8b52679194337f2e75029c7b563ea157ac44f263b2cf633779e637 files/digest-virtinst-0.103.0 289 diff --git a/app-emulation/virtinst/files/digest-virtinst-0.103.0 b/app-emulation/virtinst/files/digest-virtinst-0.103.0 new file mode 100644 index 000000000000..329c188dd9bc --- /dev/null +++ b/app-emulation/virtinst/files/digest-virtinst-0.103.0 @@ -0,0 +1,3 @@ +MD5 4a532a58772b0d02434e8d2043ea01f9 python-virtinst-0.103.0-3.fc7.src.rpm 55048 +RMD160 c0980d48db8431d00ffc1f94e63890e55b3c0d13 python-virtinst-0.103.0-3.fc7.src.rpm 55048 +SHA256 6ddceddb6f23312a73e8bc8aae79b88d9f205a026dcda4bdd3314ffd4002c858 python-virtinst-0.103.0-3.fc7.src.rpm 55048 diff --git a/app-emulation/virtinst/files/virtinst-0.103.0-accelerate.patch b/app-emulation/virtinst/files/virtinst-0.103.0-accelerate.patch new file mode 100644 index 000000000000..9dbe58ba28b3 --- /dev/null +++ b/app-emulation/virtinst/files/virtinst-0.103.0-accelerate.patch @@ -0,0 +1,30 @@ +changeset: 161:00984cdd0c55 +user: Mark McLoughlin <markmc@redhat.com> +date: Mon Apr 30 11:43:24 2007 -0400 +files: virt-install +description: +[et-mgmt-tools] [patch 1/4] Typo in kvm support +Patch from David Lutterkort + +Fixes a minor type in kvm support where we reference a +non-existent module. + +Signed-off-by: Mark McLoughlin <markmc@redhat.com> + + +diff -r 71f2046b9805 -r 00984cdd0c55 virt-install +--- a/virt-install Wed Apr 25 15:56:03 2007 -0400 ++++ b/virt-install Mon Apr 30 11:43:24 2007 -0400 +@@ -519,9 +519,9 @@ def main(): + hvm = True + type = "qemu" + if options.accelerate: +- if util.is_kvm_capable(): ++ if virtinst.util.is_kvm_capable(): + type = "kvm" +- elif util.is_kqemu_capable(): ++ elif virtinst.util.is_kqemu_capable(): + type = "kqemu" + + if hvm: + diff --git a/app-emulation/virtinst/files/virtinst-0.103.0-default-net.patch b/app-emulation/virtinst/files/virtinst-0.103.0-default-net.patch new file mode 100644 index 000000000000..4f74af57d411 --- /dev/null +++ b/app-emulation/virtinst/files/virtinst-0.103.0-default-net.patch @@ -0,0 +1,137 @@ +changeset: 165:5b37d71c88b6 +user: "Daniel P. Berrange <berrange@redhat.com>" +date: Tue May 01 11:31:32 2007 -0400 +summary: Automatically pick sensible default networking if no arg is listed, rather than defaulting to xenbr0. Pick sensible connect URI based on host OS + +diff -r cdbbe109cf8d -r 5b37d71c88b6 virt-install +--- a/virt-install Mon Apr 30 11:44:00 2007 -0400 ++++ b/virt-install Tue May 01 11:31:32 2007 -0400 +@@ -42,11 +42,6 @@ def prompt_for_input(prompt = "", val = + print prompt + " ", + return sys.stdin.readline().strip() + +- +-def check_xen(): +- if not os.path.isdir("/proc/xen"): +- print >> sys.stderr, "Can only install guests if running under a Xen kernel!" +- sys.exit(1) + + ### General input gathering functions + def get_full_virt(): +@@ -216,7 +211,8 @@ def get_networks(macs, bridges, networks + macs = [ None ] * len(networks) + else: + if os.getuid() == 0: +- networks = ["bridge:" + virtinst.util.default_bridge()] ++ net = virtinst.util.default_network() ++ networks = [net[0] + ":" + net[1]] + else: + networks = ["user"] + if macs != None: +@@ -274,9 +270,12 @@ def get_paravirt_extraargs(extra, guest) + + + ### fullvirt input gathering functions +-def get_fullvirt_cdrom(cdpath, guest): +- while 1: +- cdpath = prompt_for_input("What would you like to use for the virtual CD image?", cdpath) ++def get_fullvirt_cdrom(cdpath, location, guest): ++ if cdpath is None and location is not None: ++ cdpath = location ++ ++ while 1: ++ cdpath = prompt_for_input("What is the virtual CD image, CD device or install location?", cdpath) + try: + guest.location = cdpath + break +@@ -353,7 +352,8 @@ def parse_args(): + help="Use kernel acceleration capabilities") + parser.add_option("", "--connect", type="string", dest="connect", + action="callback", callback=check_before_store, +- help="Connect to hypervisor with URI") ++ help="Connect to hypervisor with URI", ++ default=virtinst.util.default_connection()) + + # fullvirt options + parser.add_option("-v", "--hvm", action="store_true", dest="fullvirt", +@@ -484,7 +484,6 @@ def main(): + # check to ensure we're really on a xen kernel + if conn.getType() == "Xen": + type = "xen" +- check_xen() + + if os.geteuid() != 0: + print >> sys.stderr, "Must be root to install guests" +@@ -544,7 +543,7 @@ def main(): + get_paravirt_extraargs(options.extra, guest) + continue_inst = False + else: +- get_fullvirt_cdrom(options.cdrom, guest) ++ get_fullvirt_cdrom(options.cdrom, options.location, guest) + if options.noacpi: + guest.features["acpi"] = False + if options.noapic: +diff -r cdbbe109cf8d -r 5b37d71c88b6 virtinst/util.py +--- a/virtinst/util.py Mon Apr 30 11:44:00 2007 -0400 ++++ b/virtinst/util.py Tue May 01 11:31:32 2007 -0400 +@@ -16,7 +16,7 @@ import os.path + import os.path + from sys import stderr + +-def default_bridge(): ++def default_route(): + route_file = "/proc/net/route" + d = file(route_file) + +@@ -30,12 +30,47 @@ def default_bridge(): + try: + route = int(info[1],16) + if route == 0: +- defn = int(info[0][-1]) +- break ++ return info[0] + except ValueError: + continue ++ return None + +- return "xenbr%d"%(defn) ++# Legacy for compat only. ++def default_bridge(): ++ rt = default_route() ++ defn = int(rt[-1]) ++ ++ if defn is None: ++ return "xenbr0" ++ else: ++ return "xenbr%d"%(defn) ++ ++def default_network(): ++ dev = default_route() ++ ++ if dev is not None: ++ # New style peth0 == phys dev, eth0 == bridge, eth0 == default route ++ if os.path.exists("/sys/class/net/%s/bridge" % dev): ++ return ["bridge", dev] ++ ++ # Old style, peth0 == phys dev, eth0 == netloop, xenbr0 == bridge, ++ # vif0.0 == netloop enslaved, eth0 == default route ++ defn = int(dev[-1]) ++ if os.path.exists("/sys/class/net/peth%d/brport" % defn) and \ ++ os.path.exists("/sys/class/net/xenbr%d/bridge" % defn): ++ return ["bridge", "xenbr%d" % defn] ++ ++ return ["network", "default"] ++ ++def default_connection(): ++ if os.path.exists("/var/lib/xend") and os.path.exists("/proc/xen"): ++ return "xen" ++ elif os.path.exists("/usr/bin/qemu"): ++ if os.getuid() == 0: ++ return "qemu:///system" ++ else: ++ return "qemu:///session" ++ return None + + def get_cpu_flags(): + f = open("/proc/cpuinfo") + diff --git a/app-emulation/virtinst/files/virtinst-0.103.0-features-xml.patch b/app-emulation/virtinst/files/virtinst-0.103.0-features-xml.patch new file mode 100644 index 000000000000..68acad738604 --- /dev/null +++ b/app-emulation/virtinst/files/virtinst-0.103.0-features-xml.patch @@ -0,0 +1,32 @@ +changeset: 162:ba44389ce195 +user: Mark McLoughlin <markmc@redhat.com> +date: Mon Apr 30 11:43:35 2007 -0400 +files: virtinst/FullVirtGuest.py +description: +[et-mgmt-tools] [patch 2/4] Fix typo in hvm kernel/initrd XML +Fixes a minor typo in the libvirt XML we output when booting +qemu with a kernel/initrd - the <features> block should be +outside the <os> block. + +Signed-off-by: Mark McLoughlin <markmc@redhat.com> + + +diff -r 00984cdd0c55 -r ba44389ce195 virtinst/FullVirtGuest.py +--- a/virtinst/FullVirtGuest.py Mon Apr 30 11:43:24 2007 -0400 ++++ b/virtinst/FullVirtGuest.py Mon Apr 30 11:43:35 2007 -0400 +@@ -185,10 +185,10 @@ class FullVirtGuest(Guest.XenGuest): + <kernel>%(kernel)s</kernel> + <initrd>%(initrd)s</initrd> + <cmdline>%(extra)s</cmdline> +- <features> +- %(features)s +- </features> +- </os>""" % \ ++ </os> ++ <features> ++ %(features)s ++ </features>""" % \ + { "kernel": self.kernel, \ + "initrd": self.initrd, \ + "extra": self.extraargs, \ + diff --git a/app-emulation/virtinst/files/virtinst-0.103.0-rhel5-client.patch b/app-emulation/virtinst/files/virtinst-0.103.0-rhel5-client.patch new file mode 100644 index 000000000000..9167ed62fc4e --- /dev/null +++ b/app-emulation/virtinst/files/virtinst-0.103.0-rhel5-client.patch @@ -0,0 +1,22 @@ +changeset: 166:42e9479fa521 +tag: tip +user: "Daniel P. Berrange <berrange@redhat.com>" +date: Tue May 01 11:33:16 2007 -0400 +summary: Added logic to detect RHEL5 client distro flavour + +diff -r 5b37d71c88b6 -r 42e9479fa521 virtinst/DistroManager.py +--- a/virtinst/DistroManager.py Tue May 01 11:31:32 2007 -0400 ++++ b/virtinst/DistroManager.py Tue May 01 11:33:16 2007 -0400 +@@ -214,7 +214,10 @@ class RHELImageStore(RedHatImageStore): + class RHELImageStore(RedHatImageStore): + def isValidStore(self, fetcher, progresscb): + if fetcher.hasFile("Server", progresscb): +- logging.debug("Detected a RHEL 5 distro") ++ logging.debug("Detected a RHEL 5 Server distro") ++ return True ++ if fetcher.hasFile("Client", progresscb): ++ logging.debug("Detected a RHEL 5 Client distro") + return True + if fetcher.hasFile("RedHat", progresscb): + logging.debug("Detected a RHEL 4 distro") + diff --git a/app-emulation/virtinst/files/virtinst-0.103.0-urlgrabber-import.patch b/app-emulation/virtinst/files/virtinst-0.103.0-urlgrabber-import.patch new file mode 100644 index 000000000000..ad4e74525e68 --- /dev/null +++ b/app-emulation/virtinst/files/virtinst-0.103.0-urlgrabber-import.patch @@ -0,0 +1,11 @@ +--- virtinst-0.103.0/virtinst/Guest.py.urlgrabber-import 2007-04-16 08:35:35.000000000 -0400 ++++ virtinst-0.103.0/virtinst/Guest.py 2007-04-17 12:30:41.514314000 -0400 +@@ -23,6 +23,8 @@ + + import logging + ++import urlgrabber.progress as progress ++ + class VirtualDisk: + DRIVER_FILE = "file" + DRIVER_PHY = "phy" diff --git a/app-emulation/virtinst/metadata.xml b/app-emulation/virtinst/metadata.xml new file mode 100644 index 000000000000..c9e830bb32ed --- /dev/null +++ b/app-emulation/virtinst/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>dberkholz@gentoo.org</email> + <name>Donnie Berkholz</name> +</maintainer> +</pkgmetadata> diff --git a/app-emulation/virtinst/virtinst-0.103.0.ebuild b/app-emulation/virtinst/virtinst-0.103.0.ebuild new file mode 100644 index 000000000000..c132f5852fdf --- /dev/null +++ b/app-emulation/virtinst/virtinst-0.103.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtinst/virtinst-0.103.0.ebuild,v 1.1 2007/06/10 06:07:02 dberkholz Exp $ + +inherit distutils rpm + +# Revision of the RPM. Shouldn't affect us, as we're just grabbing the source +# tarball out of it +RPMREV="3.fc7" + +MY_P="python-${P}" + +DESCRIPTION="Python modules for starting virtualized guest installations" +HOMEPAGE="http://virt-manager.et.redhat.com/" +#SRC_URI="http://virt-manager.et.redhat.com/download/sources/${PN}/${P}.tar.gz" +SRC_URI="mirror://fedora/development/source/SRPMS/${MY_P}-${RPMREV}.src.rpm" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" +RDEPEND=">=app-emulation/libvirt-0.2.1 + dev-python/urlgrabber" +DEPEND="${RDEPEND}" + +src_unpack() { + rpm_src_unpack + + cd "${S}" + epatch "${FILESDIR}"/${P}-accelerate.patch + epatch "${FILESDIR}"/${P}-default-net.patch + epatch "${FILESDIR}"/${P}-features-xml.patch + epatch "${FILESDIR}"/${P}-rhel5-client.patch + epatch "${FILESDIR}"/${P}-urlgrabber-import.patch +} |