summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-12-23 16:58:56 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-12-23 16:58:56 +0000
commit416b44b24d1e0313b60174448170287a78e8e5ec (patch)
tree4ee289574ef25cab40ee6269b17f9ceeba17b2bc /app-emulation
parentMarked ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-sola... (diff)
downloadgentoo-2-416b44b24d1e0313b60174448170287a78e8e5ec.tar.gz
gentoo-2-416b44b24d1e0313b60174448170287a78e8e5ec.tar.bz2
gentoo-2-416b44b24d1e0313b60174448170287a78e8e5ec.zip
Version bump, and overdue cleanup. Drop kvm USE flag (qemu will work with both, no special support is needed for that). Bump libxml2 requirement to 2.7.6 so that Relax-NG schema validation is performed correctly. Restrict tests as they seem to be broken especially in release.
(Portage version: 2.2_rc60/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog22
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.2-enable-qemu-0-10-migration.patch45
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.2-fix-nosource-label.patch13
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.2-shared-readonly-label.patch76
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.3-hostdev-managed.patch45
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.3-kvm-85-argv-detection.patch77
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.3-kvm-img.patch270
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.3-print-ascii-uuid.patch21
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.3-refresh-qemu-caps.patch76
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.4-kvm-img.patch278
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.4-qemu-img-logic-fix.patch12
-rw-r--r--app-emulation/libvirt/libvirt-0.7.2.ebuild147
-rw-r--r--app-emulation/libvirt/libvirt-0.7.4-r1.ebuild162
-rw-r--r--app-emulation/libvirt/libvirt-0.7.4.ebuild154
-rw-r--r--app-emulation/libvirt/libvirt-0.7.5.ebuild (renamed from app-emulation/libvirt/libvirt-0.7.4-r2.ebuild)48
-rw-r--r--app-emulation/libvirt/metadata.xml2
16 files changed, 49 insertions, 1399 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index 270292cd5a74..48a9dee0e9ba 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,26 @@
# ChangeLog for app-emulation/libvirt
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.44 2009/12/23 06:01:52 ramereth Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.45 2009/12/23 16:58:55 flameeyes Exp $
+
+*libvirt-0.7.5 (23 Dec 2009)
+
+ 23 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ -files/libvirt-0.6.2-enable-qemu-0-10-migration.patch,
+ -files/libvirt-0.6.2-fix-nosource-label.patch,
+ -files/libvirt-0.6.2-shared-readonly-label.patch,
+ -files/libvirt-0.6.3-hostdev-managed.patch,
+ -files/libvirt-0.6.3-kvm-85-argv-detection.patch,
+ -files/libvirt-0.6.3-kvm-img.patch,
+ -files/libvirt-0.6.3-print-ascii-uuid.patch,
+ -files/libvirt-0.6.3-refresh-qemu-caps.patch,
+ -files/libvirt-0.6.4-kvm-img.patch,
+ -files/libvirt-0.6.4-qemu-img-logic-fix.patch, -libvirt-0.7.2.ebuild,
+ -libvirt-0.7.4.ebuild, -libvirt-0.7.4-r1.ebuild, -libvirt-0.7.4-r2.ebuild,
+ +libvirt-0.7.5.ebuild, metadata.xml:
+ Version bump, and overdue cleanup. Drop kvm USE flag (qemu will work with
+ both, no special support is needed for that). Bump libxml2 requirement to
+ 2.7.6 so that Relax-NG schema validation is performed correctly. Restrict
+ tests as they seem to be broken especially in release.
23 Dec 2009; Lance Albertson <ramereth@gentoo.org> libvirt-0.7.2.ebuild,
libvirt-0.7.4.ebuild, libvirt-0.7.4-r1.ebuild, libvirt-0.7.4-r2.ebuild:
diff --git a/app-emulation/libvirt/files/libvirt-0.6.2-enable-qemu-0-10-migration.patch b/app-emulation/libvirt/files/libvirt-0.6.2-enable-qemu-0-10-migration.patch
deleted file mode 100644
index 1e1a1c292fdb..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.2-enable-qemu-0-10-migration.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: "Daniel P. Berrange" <berrange@redhat.com>
-To: libvir-list@redhat.com
-Date: Thu, 30 Apr 2009 15:09:05 +0100
-Subject: [libvirt] PATCH: Enable migration with QEMU >= 0.10.0
-
-The KVM migration code was added to QEMU for the 0.10.0 release, so we
-should enable this in libvirt now.
-
-Daniel
-
-diff -r be7993675e07 src/qemu_conf.c
---- a/src/qemu_conf.c Thu Apr 30 14:49:27 2009 +0100
-+++ b/src/qemu_conf.c Thu Apr 30 15:08:45 2009 +0100
-@@ -472,16 +472,13 @@ int qemudExtractVersionInfo(const char *
-
- /*
- * Handling of -incoming arg with varying features
-- * -incoming tcp (kvm >= 79)
-- * -incoming exec (kvm >= 80)
-+ * -incoming tcp (kvm >= 79, qemu >= 0.10.0)
-+ * -incoming exec (kvm >= 80, qemu >= 0.10.0)
- * -incoming stdio (all earlier kvm)
- *
- * NB, there was a pre-kvm-79 'tcp' support, but it
- * was broken, because it blocked the monitor console
- * while waiting for data, so pretend it doesn't exist
-- *
-- * XXX when next QEMU release after 0.9.1 arrives,
-- * we'll need to add MIGRATE_QEMU_TCP/EXEC here too
- */
- if (kvm_version >= 79) {
- flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP;
-@@ -489,6 +486,9 @@ int qemudExtractVersionInfo(const char *
- flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC;
- } else if (kvm_version > 0) {
- flags |= QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO;
-+ } else if (version >= 10000) {
-+ flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP;
-+ flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC;
- }
-
- if (retversion)
-
-
---
diff --git a/app-emulation/libvirt/files/libvirt-0.6.2-fix-nosource-label.patch b/app-emulation/libvirt/files/libvirt-0.6.2-fix-nosource-label.patch
deleted file mode 100644
index c0b0498fc40f..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.2-fix-nosource-label.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -rup libvirt-0.6.2/src/security_selinux.c new/src/security_selinux.c
---- libvirt-0.6.2/src/security_selinux.c 2009-05-10 22:04:25.000000000 -0400
-+++ new/src/security_selinux.c 2009-05-10 22:06:09.000000000 -0400
-@@ -338,6 +338,9 @@ SELinuxSetSecurityImageLabel(virConnectP
- {
- const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
-
-+ if (!disk->src)
-+ return 0;
-+
- if (disk->shared) {
- return SELinuxSetFilecon(conn, disk->src, default_image_context);
- } else if (disk->readonly) {
diff --git a/app-emulation/libvirt/files/libvirt-0.6.2-shared-readonly-label.patch b/app-emulation/libvirt/files/libvirt-0.6.2-shared-readonly-label.patch
deleted file mode 100644
index e962d18d0cd6..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.2-shared-readonly-label.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff -rup libvirt-0.6.2/src/security_selinux.c libvirt-0.6.2.new/src/security_selinux.c
---- libvirt-0.6.2/src/security_selinux.c 2009-04-03 15:36:56.000000000 +0100
-+++ libvirt-0.6.2.new/src/security_selinux.c 2009-05-05 13:39:42.000000000 +0100
-@@ -24,11 +24,12 @@
- #include "virterror_internal.h"
- #include "util.h"
- #include "memory.h"
--
-+#include "logging.h"
-
- #define VIR_FROM_THIS VIR_FROM_SECURITY
-
- static char default_domain_context[1024];
-+static char default_content_context[1024];
- static char default_image_context[1024];
- #define SECURITY_SELINUX_VOID_DOI "0"
- #define SECURITY_SELINUX_NAME "selinux"
-@@ -148,8 +149,13 @@ SELinuxInitialize(virConnectPtr conn)
- close(fd);
-
- ptr = strchrnul(default_image_context, '\n');
-- *ptr = '\0';
--
-+ if (*ptr == '\n') {
-+ *ptr = '\0';
-+ strcpy(default_content_context, ptr+1);
-+ ptr = strchrnul(default_content_context, '\n');
-+ if (*ptr == '\n')
-+ *ptr = '\0';
-+ }
- return 0;
- }
-
-@@ -275,6 +281,8 @@ SELinuxSetFilecon(virConnectPtr conn, co
- {
- char ebuf[1024];
-
-+ VIR_INFO("Setting SELinux context on '%s' to '%s'", path, tcon);
-+
- if(setfilecon(path, tcon) < 0) {
- virSecurityReportError(conn, VIR_ERR_ERROR,
- _("%s: unable to set security context "
-@@ -299,6 +307,8 @@ SELinuxRestoreSecurityImageLabel(virConn
- char *newpath = NULL;
- const char *path = disk->src;
-
-+ /* Don't restore labels on readoly/shared disks, because
-+ * other VMs may still be accessing these */
- if (disk->readonly || disk->shared)
- return 0;
-
-@@ -328,8 +338,13 @@ SELinuxSetSecurityImageLabel(virConnectP
- {
- const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
-
-- if (secdef->imagelabel)
-+ if (disk->shared) {
-+ return SELinuxSetFilecon(conn, disk->src, default_image_context);
-+ } else if (disk->readonly) {
-+ return SELinuxSetFilecon(conn, disk->src, default_content_context);
-+ } else if (secdef->imagelabel) {
- return SELinuxSetFilecon(conn, disk->src, secdef->imagelabel);
-+ }
-
- return 0;
- }
-@@ -403,9 +418,6 @@ SELinuxSetSecurityLabel(virConnectPtr co
-
- if (secdef->imagelabel) {
- for (i = 0 ; i < vm->def->ndisks ; i++) {
-- if (vm->def->disks[i]->readonly ||
-- vm->def->disks[i]->shared) continue;
--
- if (SELinuxSetSecurityImageLabel(conn, vm, vm->def->disks[i]) < 0)
- return -1;
- }
diff --git a/app-emulation/libvirt/files/libvirt-0.6.3-hostdev-managed.patch b/app-emulation/libvirt/files/libvirt-0.6.3-hostdev-managed.patch
deleted file mode 100644
index 4d62aaadb725..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.3-hostdev-managed.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 3d7771e0570e09096ad9391a857dad48b150bc0c Mon Sep 17 00:00:00 2001
-From: Mark McLoughlin <markmc@redhat.com>
-Date: Wed, 6 May 2009 16:33:28 +0100
-Subject: [PATCH] Fix qemu driver's interpretation of <hostdev managed='yes'/>
-
-This change:
-
- Tue Mar 3 08:55:13 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
-
- Don't try to detach & reset PCI devices while running test
- suite for XML-> ARGV conversion.
- * src/qemu_driver.c: Add qemuPrepareHostDevices() helper to
- detach and reset PCI devices.
- * src/qemu_conf.c: Don't detach & reset PCI devices while
- building the command line argv
-
-accidentally did this:
-
-- if (hostdev->managed) {
-+ if (!hostdev->managed) {
-
-Which results in managed='yes' not causing the device to be
-detached when the guest is starting.
-
-Signed-off-by: Mark McLoughlin <markmc@redhat.com>
----
- src/qemu_driver.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/qemu_driver.c b/src/qemu_driver.c
-index 5898026..59312c0 100644
---- a/src/qemu_driver.c
-+++ b/src/qemu_driver.c
-@@ -1215,7 +1215,7 @@ static int qemuPrepareHostDevices(virConnectPtr conn,
- if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
- continue;
-
-- if (!hostdev->managed) {
-+ if (hostdev->managed) {
- pciDevice *dev = pciGetDevice(conn,
- hostdev->source.subsys.u.pci.domain,
- hostdev->source.subsys.u.pci.bus,
---
-1.6.0.6
-
diff --git a/app-emulation/libvirt/files/libvirt-0.6.3-kvm-85-argv-detection.patch b/app-emulation/libvirt/files/libvirt-0.6.3-kvm-85-argv-detection.patch
deleted file mode 100644
index 23d7ebcf97e4..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.3-kvm-85-argv-detection.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From: Daniel P. Berrange <berrange@redhat.com>
-Date: Mon, 11 May 2009 15:14:24 +0000 (+0000)
-Subject: Fix QEMU ARGV detection with kvm >= 85
-X-Git-Url: http://git.et.redhat.com/?p=libvirt.git;a=commitdiff_plain;h=2b3fcdc378e7bec5c1a78b81632756e92930fd24;hp=07592a3c03771cea7389ae463aa2925748ac970e
-
-Fix QEMU ARGV detection with kvm >= 85
----
-
-diff --git a/src/qemu_conf.c b/src/qemu_conf.c
-index 9cb71eb..a57d3ab 100644
---- a/src/qemu_conf.c
-+++ b/src/qemu_conf.c
-@@ -431,18 +431,28 @@ int qemudExtractVersionInfo(const char *qemu,
- return -1;
-
- char *help = NULL;
-- enum { MAX_HELP_OUTPUT_SIZE = 8192 };
-+ enum { MAX_HELP_OUTPUT_SIZE = 1024*64 };
- int len = virFileReadLimFD(newstdout, MAX_HELP_OUTPUT_SIZE, &help);
-- if (len < 0)
-+ if (len < 0) {
-+ virReportSystemError(NULL, errno, "%s",
-+ _("Unable to read QEMU help output"));
- goto cleanup2;
-+ }
-
- if (sscanf(help, "QEMU PC emulator version %u.%u.%u (kvm-%u)",
- &major, &minor, &micro, &kvm_version) != 4)
- kvm_version = 0;
-
-- if (!kvm_version && sscanf(help, "QEMU PC emulator version %u.%u.%u",
-- &major, &minor, &micro) != 3)
-+ if (!kvm_version &&
-+ sscanf(help, "QEMU PC emulator version %u.%u.%u",
-+ &major, &minor, &micro) != 3) {
-+ char *eol = strchr(help, '\n');
-+ if (eol) *eol = '\0';
-+ qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
-+ _("cannot parse QEMU version number in '%s'"),
-+ help);
- goto cleanup2;
-+ }
-
- version = (major * 1000 * 1000) + (minor * 1000) + micro;
-
-diff --git a/src/qemu_driver.c b/src/qemu_driver.c
-index 30642d5..bd60b29 100644
---- a/src/qemu_driver.c
-+++ b/src/qemu_driver.c
-@@ -1391,12 +1391,8 @@ static int qemudStartVMDaemon(virConnectPtr conn,
-
- if (qemudExtractVersionInfo(emulator,
- NULL,
-- &qemuCmdFlags) < 0) {
-- qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
-- _("Cannot determine QEMU argv syntax %s"),
-- emulator);
-+ &qemuCmdFlags) < 0)
- goto cleanup;
-- }
-
- if (qemuPrepareHostDevices(conn, vm->def) < 0)
- goto cleanup;
-@@ -3715,12 +3711,8 @@ static int qemudDomainChangeEjectableMedia(virConnectPtr conn,
-
- if (qemudExtractVersionInfo(vm->def->emulator,
- NULL,
-- &qemuCmdFlags) < 0) {
-- qemudReportError(conn, dom, NULL, VIR_ERR_INTERNAL_ERROR,
-- _("Cannot determine QEMU argv syntax %s"),
-- vm->def->emulator);
-+ &qemuCmdFlags) < 0)
- return -1;
-- }
-
- if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE) {
- if (!(devname = qemudDiskDeviceName(conn, newdisk)))
diff --git a/app-emulation/libvirt/files/libvirt-0.6.3-kvm-img.patch b/app-emulation/libvirt/files/libvirt-0.6.3-kvm-img.patch
deleted file mode 100644
index 8d0ed091cb82..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.3-kvm-img.patch
+++ /dev/null
@@ -1,270 +0,0 @@
-diff -Nur libvirt-0.6.3/configure.in libvirt-0.6.3-kvm-img/configure.in
---- libvirt-0.6.3/configure.in 2009-04-24 08:14:00.000000000 -0500
-+++ libvirt-0.6.3-kvm-img/configure.in 2009-05-27 16:49:07.000000000 -0500
-@@ -847,21 +847,6 @@
- [Location or name of the showmount program])
- fi
-
--AC_PATH_PROG([QEMU_IMG], [qemu-img], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin])
--if test -n "$QEMU_IMG" ; then
-- AC_DEFINE_UNQUOTED([HAVE_QEMU_IMG], 1, [whether qemu-img is available for non-raw files])
-- AC_DEFINE_UNQUOTED([QEMU_IMG],["$QEMU_IMG"],
-- [Location or name of the qemu-img program])
--fi
--
--AC_PATH_PROG([QCOW_CREATE], [qcow-create], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin])
--if test -n "$QCOW_CREATE" ; then
-- AC_DEFINE_UNQUOTED([HAVE_QCOW_CREATE], 1, [whether qcow-create is available for non-raw files])
-- AC_DEFINE_UNQUOTED([QCOW_CREATE],["$QCOW_CREATE"],
-- [Location or name of the qcow-create program])
--fi
--
--
- if test "$with_storage_lvm" = "yes" -o "$with_storage_lvm" = "check"; then
- AC_PATH_PROG([PVCREATE], [pvcreate], [], [$PATH:/sbin:/usr/sbin])
- AC_PATH_PROG([VGCREATE], [vgcreate], [], [$PATH:/sbin:/usr/sbin])
-diff -Nur libvirt-0.6.3/src/libvirt_private.syms libvirt-0.6.3-kvm-img/src/libvirt_private.syms
---- libvirt-0.6.3/src/libvirt_private.syms 2009-04-24 07:51:46.000000000 -0500
-+++ libvirt-0.6.3-kvm-img/src/libvirt_private.syms 2009-05-27 17:15:48.000000000 -0500
-@@ -327,6 +327,7 @@
- virGetHostname;
- virParseMacAddr;
- virFileDeletePid;
-+virFindFileInPath;
- virFileExists;
- virFileHasSuffix;
- virFileLinkPointsTo;
-diff -Nur libvirt-0.6.3/src/storage_backend_fs.c libvirt-0.6.3-kvm-img/src/storage_backend_fs.c
---- libvirt-0.6.3/src/storage_backend_fs.c 2009-04-17 14:07:48.000000000 -0500
-+++ libvirt-0.6.3-kvm-img/src/storage_backend_fs.c 2009-05-27 17:13:27.000000000 -0500
-@@ -1013,7 +1013,7 @@
-
- /**
- * Allocate a new file as a volume. This is either done directly
-- * for raw/sparse files, or by calling qemu-img/qcow-create for
-+ * for raw/sparse files, or by calling kvm-img/qemu-img/qcow-create for
- * special kinds of files
- */
- static int
-@@ -1021,6 +1021,7 @@
- virStorageVolDefPtr vol)
- {
- int fd;
-+ char *kvmimg = NULL, *qemuimg = NULL, *qcowcreate = NULL;
-
- if (vol->target.format == VIR_STORAGE_VOL_FILE_RAW) {
- if ((fd = open(vol->target.path, O_RDWR | O_CREAT | O_EXCL,
-@@ -1095,61 +1096,94 @@
- vol->target.path);
- return -1;
- }
-- } else {
--#if HAVE_QEMU_IMG
-+ } else if (((kvmimg = virFindFileInPath("kvm-img")) != NULL) ||
-+ ((qemuimg = virFindFileInPath("qemu-img")) != NULL)) {
- const char *type = virStorageVolFormatFileSystemTypeToString(vol->target.format);
- const char *backingType = vol->backingStore.path ?
- virStorageVolFormatFileSystemTypeToString(vol->backingStore.format) : NULL;
- char size[100];
-- const char **imgargv;
-- const char *imgargvnormal[] = {
-- QEMU_IMG, "create", "-f", type, vol->target.path, size, NULL,
-- };
-- /* XXX including "backingType" here too, once QEMU accepts
-- * the patches to specify it. It'll probably be -F backingType */
-- const char *imgargvbacking[] = {
-- QEMU_IMG, "create", "-f", type, "-b", vol->backingStore.path, vol->target.path, size, NULL,
-- };
-+ char *createtool;
-+ const char *imgargv[11];
-+ int argvoffset;
-+
-+ if (kvmimg != NULL)
-+ imgargv[0] = kvmimg;
-+ else if (qemuimg != NULL)
-+ imgargv[0] = qemuimg;
-+ else {
-+ virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
-+ _("Can not find qemu-img or kvm-img"));
-+ return -1;
-+ }
-+
-+ /* these values are always the same no matter the command */
-+ imgargv[1] = "create";
-+ imgargv[2] = "-f";
-+ imgargv[3] = type;
-+ argvoffset = 4;
-
- if (type == NULL) {
- virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
- _("unknown storage vol type %d"),
- vol->target.format);
-+ free(kvmimg);
-+ free(qemuimg);
- return -1;
- }
-- if (vol->backingStore.path == NULL) {
-- imgargv = imgargvnormal;
-- } else {
-+
-+ if (vol->backingStore.path != NULL) {
- if (backingType == NULL) {
- virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
- _("unknown storage vol backing store type %d"),
- vol->backingStore.format);
-+ free(kvmimg);
-+ free(qemuimg);
- return -1;
- }
-+
-+ /* XXX including "backingType" here too, once QEMU accepts
-+ * the patches to specify it. It'll probably be -F backingType */
-+ if (kvmimg != NULL) {
-+ imgargv[argvoffset++] = "-F";
-+ imgargv[argvoffset++] = backingType;
-+ }
-+
- if (access(vol->backingStore.path, R_OK) != 0) {
- virReportSystemError(conn, errno,
- _("inaccessible backing store volume %s"),
- vol->backingStore.path);
-+ free(kvmimg);
-+ free(qemuimg);
- return -1;
- }
-
-- imgargv = imgargvbacking;
-+ imgargv[argvoffset++] = "-b";
-+ imgargv[argvoffset++] = vol->backingStore.path;
- }
-
-+ imgargv[argvoffset++] = vol->target.path;
-+ imgargv[argvoffset++] = size;
-+ imgargv[argvoffset] = NULL;
-+
- /* Size in KB */
- snprintf(size, sizeof(size), "%llu", vol->capacity/1024);
-
- if (virRun(conn, imgargv, NULL) < 0) {
-+ free(kvmimg);
-+ free(qemuimg);
- return -1;
- }
-
-+ free(kvmimg);
-+ free(qemuimg);
-+
- if ((fd = open(vol->target.path, O_RDONLY)) < 0) {
- virReportSystemError(conn, errno,
- _("cannot read path '%s'"),
- vol->target.path);
- return -1;
- }
--#elif HAVE_QCOW_CREATE
-+ } else if ((qcowcreate = virFindFileInPath("qcow-create")) != NULL) {
- /*
- * Xen removed the fully-functional qemu-img, and replaced it
- * with a partially functional qcow-create. Go figure ??!?
-@@ -1161,39 +1195,44 @@
- virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
- _("unsupported storage vol type %d"),
- vol->target.format);
-+ free(qcowcreate);
- return -1;
- }
- if (vol->backingStore.path != NULL) {
- virStorageReportError(conn, VIR_ERR_NO_SUPPORT,
- _("copy-on-write image not supported with "
- "qcow-create"));
-+ free(qcowcreate);
- return -1;
- }
-
- /* Size in MB - yes different units to qemu-img :-( */
- snprintf(size, sizeof(size), "%llu", vol->capacity/1024/1024);
-
-- imgargv[0] = QCOW_CREATE;
-+ imgargv[0] = qcowcreate;
- imgargv[1] = size;
- imgargv[2] = vol->target.path;
- imgargv[3] = NULL;
-
- if (virRun(conn, imgargv, NULL) < 0) {
-+ free(qcowcreate);
- return -1;
- }
-
-+ free(qcowcreate);
-+
- if ((fd = open(vol->target.path, O_RDONLY)) < 0) {
- virReportSystemError(conn, errno,
- _("cannot read path '%s'"),
- vol->target.path);
- return -1;
- }
--#else
-+ } else {
- virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
- "%s", _("creation of non-raw images "
-- "is not supported without qemu-img"));
-+ "is not supported without kvm-img or "
-+ "qemu-img or qcow-create"));
- return -1;
--#endif
- }
-
- /* We can only chown/grp if root */
-diff -Nur libvirt-0.6.3/src/util.c libvirt-0.6.3-kvm-img/src/util.c
---- libvirt-0.6.3/src/util.c 2009-04-24 04:46:45.000000000 -0500
-+++ libvirt-0.6.3-kvm-img/src/util.c 2009-05-27 16:54:23.000000000 -0500
-@@ -1002,6 +1002,38 @@
- return(0);
- }
-
-+/*
-+ * Find a file in the PATH. You must free
-+ * the result
-+ */
-+char *virFindFileInPath(const char *find)
-+{
-+ char pathenv[PATH_MAX];
-+ char *pathseg;
-+ char *fullpath;
-+
-+ /* copy PATH env so we can tweak it */
-+ strncpy(pathenv, getenv("PATH"), PATH_MAX);
-+ pathenv[PATH_MAX - 1] = '\0';
-+
-+ /* buffer for our file path */
-+ fullpath = malloc(PATH_MAX);
-+ if (fullpath == NULL)
-+ return NULL;
-+
-+ /* for each path segment, append the file name to search for
-+ * and test for it. return it if successful */
-+ while ((pathseg = strsep(&pathenv, ":")) != NULL) {
-+ snprintf(fullpath, PATH_MAX, "%s/%s", pathseg, find);
-+ if (virFileExists(fullpath))
-+ return fullpath;
-+ }
-+
-+ free(fullpath);
-+
-+ return NULL;
-+}
-+
- int virFileMakePath(const char *path)
- {
- struct stat st;
-diff -Nur libvirt-0.6.3/src/util.h libvirt-0.6.3-kvm-img/src/util.h
---- libvirt-0.6.3/src/util.h 2009-04-24 04:46:45.000000000 -0500
-+++ libvirt-0.6.3-kvm-img/src/util.h 2009-05-27 16:15:26.000000000 -0500
-@@ -92,6 +92,8 @@
-
- int virFileExists(const char *path);
-
-+char *virFindFileInPath(const char *find);
-+
- int virFileMakePath(const char *path);
-
- int virFileBuildPath(const char *dir,
diff --git a/app-emulation/libvirt/files/libvirt-0.6.3-print-ascii-uuid.patch b/app-emulation/libvirt/files/libvirt-0.6.3-print-ascii-uuid.patch
deleted file mode 100644
index 054a5716cbb8..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.3-print-ascii-uuid.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Currently we print the raw UUID which isn't very useful in ascii format.
-
-Signed-off-by: Cole Robinson <crobinso@redhat.com>
----
- src/qemu_driver.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/qemu_driver.c b/src/qemu_driver.c
-index 40f5790..9bd7d03 100644
---- a/src/qemu_driver.c
-+++ b/src/qemu_driver.c
-@@ -2043,7 +2043,7 @@ static virDomainPtr qemudDomainLookupByUUID(virConnectPtr conn,
- char uuidstr[VIR_UUID_STRING_BUFLEN];
- virUUIDFormat(uuid, uuidstr);
- qemudReportError(conn, NULL, NULL, VIR_ERR_NO_DOMAIN,
-- _("no domain with matching uuid '%s'"), uuid);
-+ _("no domain with matching uuid '%s'"), uuidstr);
- goto cleanup;
- }
-
-
diff --git a/app-emulation/libvirt/files/libvirt-0.6.3-refresh-qemu-caps.patch b/app-emulation/libvirt/files/libvirt-0.6.3-refresh-qemu-caps.patch
deleted file mode 100644
index 804d54ec1ef5..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.3-refresh-qemu-caps.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-commit 0e51348cb9aeafe5e2fd6469a4bde0baa1eb8720
-Author: Cole Robinson <crobinso@redhat.com>
-Date: Mon May 4 15:06:03 2009 -0400
-
- Refresh QEMU driver capabilities for each getCapabilities call.
-
- Also fix up a couple issues where caps are accessed without locking
- the driver structure.
-
-diff --git a/src/qemu_driver.c b/src/qemu_driver.c
-index 23ea961..790dac6 100644
---- a/src/qemu_driver.c
-+++ b/src/qemu_driver.c
-@@ -1885,10 +1885,12 @@ static int qemudGetNodeInfo(virConnectPtr conn,
-
- static char *qemudGetCapabilities(virConnectPtr conn) {
- struct qemud_driver *driver = conn->privateData;
-- char *xml;
-+ char *xml = NULL;
-
- qemuDriverLock(driver);
-- if ((xml = virCapabilitiesFormatXML(driver->caps)) == NULL)
-+ virCapabilitiesFree(qemu_driver->caps);
-+ if ((qemu_driver->caps = qemudCapsInit()) == NULL ||
-+ (xml = virCapabilitiesFormatXML(driver->caps)) == NULL)
- virReportOOMError(conn);
- qemuDriverUnlock(driver);
-
-@@ -3169,20 +3171,26 @@ cleanup:
- return ret;
- }
-
--static int qemudNodeGetSecurityModel(virConnectPtr conn, virSecurityModelPtr secmodel)
-+static int qemudNodeGetSecurityModel(virConnectPtr conn,
-+ virSecurityModelPtr secmodel)
- {
- struct qemud_driver *driver = (struct qemud_driver *)conn->privateData;
- char *p;
-+ int ret = 0;
-
-- if (!driver->securityDriver)
-- return -2;
-+ qemuDriverLock(driver);
-+ if (!driver->securityDriver) {
-+ ret = -2;
-+ goto cleanup;
-+ }
-
- p = driver->caps->host.secModel.model;
- if (strlen(p) >= VIR_SECURITY_MODEL_BUFLEN-1) {
- qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
- _("security model string exceeds max %d bytes"),
- VIR_SECURITY_MODEL_BUFLEN-1);
-- return -1;
-+ ret = -1;
-+ goto cleanup;
- }
- strcpy(secmodel->model, p);
-
-@@ -3191,10 +3199,14 @@ static int qemudNodeGetSecurityModel(virConnectPtr conn, virSecurityModelPtr sec
- qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
- _("security DOI string exceeds max %d bytes"),
- VIR_SECURITY_DOI_BUFLEN-1);
-- return -1;
-+ ret = -1;
-+ goto cleanup;
- }
- strcpy(secmodel->doi, p);
-- return 0;
-+
-+cleanup:
-+ qemuDriverUnlock(driver);
-+ return ret;
- }
-
- /* TODO: check seclabel restore */
diff --git a/app-emulation/libvirt/files/libvirt-0.6.4-kvm-img.patch b/app-emulation/libvirt/files/libvirt-0.6.4-kvm-img.patch
deleted file mode 100644
index 74e8dfd753d9..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.4-kvm-img.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-commit 414b18f7dd75537f4bd50ea6476e1b95389d7868
-Author: Doug Goldstein <cardoe@gentoo.org>
-Date: Mon Jun 8 12:24:27 2009 -0500
-
- Support kvm-img or qemu-img dynamically
-
- This patch adds a new function virFindFileInPath() and uses it to find
- where a binary lives in the PATH environment variable. Using this, we
- can dynamically find where utility functions exist (and if they even
- exists). So such we remove the build-time check for qemu-img and make it
- dynamic for kvm-img and qemu-img. Several distros uses kvm-img over
- qemu-img when installing KVM. kvm-img also includes several patches
- which Red Hat is trying to upstream with QEMU so this patch supports
- those features which are commented out in libvirt when using kvm-img
-
-diff --git a/configure.in b/configure.in
-index 5c0575c..552c761 100644
---- a/configure.in
-+++ b/configure.in
-@@ -889,21 +889,6 @@ if test "$with_storage_fs" = "yes"; then
- [Location or name of the showmount program])
- fi
-
--AC_PATH_PROG([QEMU_IMG], [qemu-img], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin])
--if test -n "$QEMU_IMG" ; then
-- AC_DEFINE_UNQUOTED([HAVE_QEMU_IMG], 1, [whether qemu-img is available for non-raw files])
-- AC_DEFINE_UNQUOTED([QEMU_IMG],["$QEMU_IMG"],
-- [Location or name of the qemu-img program])
--fi
--
--AC_PATH_PROG([QCOW_CREATE], [qcow-create], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin])
--if test -n "$QCOW_CREATE" ; then
-- AC_DEFINE_UNQUOTED([HAVE_QCOW_CREATE], 1, [whether qcow-create is available for non-raw files])
-- AC_DEFINE_UNQUOTED([QCOW_CREATE],["$QCOW_CREATE"],
-- [Location or name of the qcow-create program])
--fi
--
--
- if test "$with_storage_lvm" = "yes" -o "$with_storage_lvm" = "check"; then
- AC_PATH_PROG([PVCREATE], [pvcreate], [], [$PATH:/sbin:/usr/sbin])
- AC_PATH_PROG([VGCREATE], [vgcreate], [], [$PATH:/sbin:/usr/sbin])
-diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
-index b39216f..0c55684 100644
---- a/src/libvirt_private.syms
-+++ b/src/libvirt_private.syms
-@@ -330,6 +330,7 @@ virFormatMacAddr;
- virGetHostname;
- virParseMacAddr;
- virFileDeletePid;
-+virFindFileInPath;
- virFileExists;
- virFileHasSuffix;
- virFileLinkPointsTo;
-diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c
-index be6d011..0175152 100644
---- a/src/storage_backend_fs.c
-+++ b/src/storage_backend_fs.c
-@@ -1183,11 +1183,12 @@ static int createFileDir(virConnectPtr conn,
- return 0;
- }
-
--#if HAVE_QEMU_IMG
- static int createQemuImg(virConnectPtr conn,
- virStorageVolDefPtr vol,
- virStorageVolDefPtr inputvol) {
- char size[100];
-+ char *create_tool;
-+ short use_kvmimg;
-
- const char *type = virStorageVolFormatFileSystemTypeToString(vol->target.format);
- const char *backingType = vol->backingStore.path ?
-@@ -1203,24 +1204,27 @@ static int createQemuImg(virConnectPtr conn,
-
- const char **imgargv;
- const char *imgargvnormal[] = {
-- QEMU_IMG, "create",
-+ NULL, "create",
- "-f", type,
- vol->target.path,
- size,
- NULL,
- };
-- /* XXX including "backingType" here too, once QEMU accepts
-- * the patches to specify it. It'll probably be -F backingType */
-+ /* Extra NULL fields are for including "backingType" when using
-+ * kvm-img. It's -F backingType
-+ */
- const char *imgargvbacking[] = {
-- QEMU_IMG, "create",
-+ NULL, "create",
- "-f", type,
- "-b", vol->backingStore.path,
- vol->target.path,
- size,
- NULL,
-+ NULL,
-+ NULL
- };
- const char *convargv[] = {
-- QEMU_IMG, "convert",
-+ NULL, "convert",
- "-f", inputType,
- "-O", type,
- inputPath,
-@@ -1228,14 +1232,6 @@ static int createQemuImg(virConnectPtr conn,
- NULL,
- };
-
-- if (inputvol) {
-- imgargv = convargv;
-- } else if (vol->backingStore.path) {
-- imgargv = imgargvbacking;
-- } else {
-- imgargv = imgargvnormal;
-- }
--
- if (type == NULL) {
- virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
- _("unknown storage vol type %d"),
-@@ -1277,17 +1273,47 @@ static int createQemuImg(virConnectPtr conn,
- }
- }
-
-+ if ((create_tool = virFindFileInPath("kvm-img")) != NULL)
-+ use_kvmimg = 1;
-+ else if ((create_tool = virFindFileInPath("qemu-img")) != NULL)
-+ use_kvmimg = 0;
-+ else {
-+ virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
-+ _("unable to find kvm-img or qemu-img"));
-+ return -1;
-+ }
-+
-+ if (inputvol) {
-+ convargv[0] = create_tool;
-+ imgargv = convargv;
-+ } else if (vol->backingStore.path) {
-+ imgargvbacking[0] = create_tool;
-+ if (use_kvmimg) {
-+ imgargvbacking[6] = "-F";
-+ imgargvbacking[7] = backingType;
-+ imgargvbacking[8] = vol->target.path;
-+ imgargvbacking[9] = size;
-+ }
-+ imgargv = imgargvbacking;
-+ } else {
-+ imgargvnormal[0] = create_tool;
-+ imgargv = imgargvnormal;
-+ }
-+
-+
- /* Size in KB */
- snprintf(size, sizeof(size), "%llu", vol->capacity/1024);
-
- if (virRun(conn, imgargv, NULL) < 0) {
-+ VIR_FREE(imgargv[0]);
- return -1;
- }
-
-+ VIR_FREE(imgargv[0]);
-+
- return 0;
- }
-
--#elif HAVE_QCOW_CREATE
- /*
- * Xen removed the fully-functional qemu-img, and replaced it
- * with a partially functional qcow-create. Go figure ??!?
-@@ -1321,18 +1347,20 @@ static int createQemuCreate(virConnectPtr conn,
- /* Size in MB - yes different units to qemu-img :-( */
- snprintf(size, sizeof(size), "%llu", vol->capacity/1024/1024);
-
-- imgargv[0] = QCOW_CREATE;
-+ imgargv[0] = virFindFileInPath("qcow-create");
- imgargv[1] = size;
- imgargv[2] = vol->target.path;
- imgargv[3] = NULL;
-
- if (virRun(conn, imgargv, NULL) < 0) {
-+ VIR_FREE(imgargv[0]);
- return -1;
- }
-
-+ VIR_FREE(imgargv[0]);
-+
- return 0;
- }
--#endif /* HAVE_QEMU_IMG, elif HAVE_QCOW_CREATE */
-
- static int
- _virStorageBackendFileSystemVolBuild(virConnectPtr conn,
-@@ -1341,6 +1369,7 @@ _virStorageBackendFileSystemVolBuild(virConnectPtr conn,
- {
- int fd;
- createFile create_func;
-+ char *create_tool;
-
- if (vol->target.format == VIR_STORAGE_VOL_FILE_RAW &&
- (!inputvol ||
-@@ -1353,17 +1382,20 @@ _virStorageBackendFileSystemVolBuild(virConnectPtr conn,
- create_func = createRaw;
- } else if (vol->target.format == VIR_STORAGE_VOL_FILE_DIR) {
- create_func = createFileDir;
-- } else {
--#if HAVE_QEMU_IMG
-+ } else if ((create_tool = virFindFileInPath("kvm-img")) != NULL) {
-+ VIR_FREE(create_tool);
-+ create_func = createQemuImg;
-+ } else if ((create_tool = virFindFileInPath("qemu-img")) != NULL) {
-+ VIR_FREE(create_tool);
- create_func = createQemuImg;
--#elif HAVE_QCOW_CREATE
-+ } else if ((create_tool = virFindFileInPath("qcow-create")) != NULL) {
-+ VIR_FREE(create_tool);
- create_func = createQemuCreate;
--#else
-+ } else {
- virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
- "%s", _("creation of non-raw images "
- "is not supported without qemu-img"));
- return -1;
--#endif
- }
-
- if (create_func(conn, vol, inputvol) < 0)
-diff --git a/src/util.c b/src/util.c
-index 3a8c105..664fb0f 100644
---- a/src/util.c
-+++ b/src/util.c
-@@ -1073,7 +1073,35 @@ int virFileResolveLink(const char *linkpath,
- #endif
- }
-
-+/*
-+ * Finds a requested file in the PATH env. e.g.:
-+ * "kvm-img" will return "/usr/bin/kvm-img"
-+ *
-+ * You must free the result
-+ */
-+char *virFindFileInPath(const char *file)
-+{
-+ char pathenv[PATH_MAX];
-+ char *penv = &pathenv; /* this is for glibc 2.10 strsep chnages */
-+ char *pathseg;
-+ char fullpath[PATH_MAX];
-+
-+ /* copy PATH env so we can tweak it */
-+ strncpy(pathenv, getenv("PATH"), PATH_MAX);
-+ pathenv[PATH_MAX - 1] = '\0';
-+
-
-+ /* for each path segment, append the file to search for and test for
-+ * it. return it if found.
-+ */
-+ while ((pathseg = strsep(&penv, ":")) != NULL) {
-+ snprintf(fullpath, PATH_MAX, "%s/%s", pathseg, file);
-+ if (virFileExists(fullpath))
-+ return strdup(fullpath);
-+ }
-+
-+ return NULL;
-+}
- int virFileExists(const char *path)
- {
- struct stat st;
-diff --git a/src/util.h b/src/util.h
-index 61e1eb5..e6e8010 100644
---- a/src/util.h
-+++ b/src/util.h
-@@ -101,6 +101,8 @@ int virFileLinkPointsTo(const char *checkLink,
- int virFileResolveLink(const char *linkpath,
- char **resultpath);
-
-+char *virFindFileInPath(const char *file);
-+
- int virFileExists(const char *path);
-
- int virFileMakePath(const char *path);
diff --git a/app-emulation/libvirt/files/libvirt-0.6.4-qemu-img-logic-fix.patch b/app-emulation/libvirt/files/libvirt-0.6.4-qemu-img-logic-fix.patch
deleted file mode 100644
index 6462de326ea6..000000000000
--- a/app-emulation/libvirt/files/libvirt-0.6.4-qemu-img-logic-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur libvirt-0.6.4/src/storage_backend_fs.c libvirt-0.6.4-qemu-img/src/storage_backend_fs.c
---- libvirt-0.6.4/src/storage_backend_fs.c 2009-05-20 02:02:59.000000000 -0500
-+++ libvirt-0.6.4-qemu-img/src/storage_backend_fs.c 2009-06-08 14:38:36.000000000 -0500
-@@ -1255,7 +1255,7 @@
- * backing store, not really sure what use it serves though, and it
- * may cause issues with lvm. Untested essentially.
- */
-- if (!inputBackingPath ||
-+ if (inputBackingPath &&
- !STREQ(inputBackingPath, vol->backingStore.path)) {
- virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
- "%s", _("a different backing store can not "
diff --git a/app-emulation/libvirt/libvirt-0.7.2.ebuild b/app-emulation/libvirt/libvirt-0.7.2.ebuild
deleted file mode 100644
index 51990e224969..000000000000
--- a/app-emulation/libvirt/libvirt-0.7.2.ebuild
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.7.2.ebuild,v 1.6 2009/12/23 06:01:52 ramereth Exp $
-
-EAPI="2"
-
-inherit eutils python
-
-DESCRIPTION="C toolkit to manipulate virtual machines"
-HOMEPAGE="http://www.libvirt.org/"
-SRC_URI="http://libvirt.org/sources/${P}.tar.gz"
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="avahi caps hal iscsi kvm +libvirtd lvm +lxc +network nfs one nls numa
- openvz parted phyp policykit python qemu sasl selinux uml virtualbox xen"
-# devicekit isn't in portage
-
-RDEPEND="sys-libs/readline
- sys-libs/ncurses
- net-misc/curl
- >=dev-libs/libxml2-2.5
- >=net-libs/gnutls-1.0.25
- dev-lang/python
- sys-fs/sysfsutils
- sys-apps/util-linux
- >=net-analyzer/netcat6-1.0-r2
- avahi? ( >=net-dns/avahi-0.6 )
- caps? ( sys-libs/libcap-ng )
- hal? ( >=sys-apps/hal-0.5.9 )
- iscsi? ( sys-block/open-iscsi )
- kvm? ( app-emulation/qemu-kvm )
- libvirtd? ( net-misc/bridge-utils )
- lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
- network? ( net-dns/dnsmasq net-firewall/iptables )
- nfs? ( net-fs/nfs-utils )
- numa? ( sys-process/numactl )
- one? ( dev-libs/xmlrpc-c )
- openvz? ( sys-kernel/openvz-sources )
- parted? ( >=sys-apps/parted-1.8 )
- phyp? ( net-libs/libssh2 )
- policykit? ( >=sys-auth/policykit-0.6 )
- qemu? ( || ( app-emulation/qemu-kvm >=app-emulation/qemu-0.10.0 ) )
- sasl? ( dev-libs/cyrus-sasl )
- selinux? ( sys-libs/libselinux )
- virtualbox? ( || ( >=app-emulation/virtualbox-ose-2.2.0 >=app-emulation/virtualbox-bin-2.2.0 ) )
- xen? ( app-emulation/xen-tools app-emulation/xen )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- nls? ( sys-devel/gettext )"
-
-src_configure() {
- local myconf=""
-
- ## enable/disable daemon, otherwise client only utils
- myconf="${myconf} $(use_with libvirtd)"
-
- ## enable/disable the daemon using avahi to find VMs
- myconf="${myconf} $(use_with avahi)"
-
- ## hypervisors on the local host
- myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)"
- if ! use policykit && use xen; then
- myconf="${myconf} --with-xen-proxy"
- fi
- myconf="${myconf} $(use_with openvz)"
- myconf="${myconf} $(use_with lxc)"
- myconf="${myconf} $(use_with virtualbox vbox)"
- myconf="${myconf} $(use_with uml)"
- if use qemu || use kvm ; then
- myconf="${myconf} --with-qemu"
- else
- myconf="${myconf} --without-qemu"
- fi
- # doesn't belong with hypervisors but links to libvirtd for some reason
- myconf="${myconf} $(use_with one)"
-
- ## hypervisor protocols
- myconf="${myconf} $(use_with phyp)"
- myconf="${myconf} --with-esx"
-
- ## additional host drivers
- myconf="${myconf} $(use_with network)"
- myconf="${myconf} --with-storage-fs"
- myconf="${myconf} $(use_with lvm storage-lvm)"
- myconf="${myconf} $(use_with iscsi storage-iscsi)"
- myconf="${myconf} $(use_with parted storage-disk)"
- myconf="${myconf} $(use_with lvm storage-mpath)"
- myconf="${myconf} $(use_with numa numactl)"
- myconf="${myconf} $(use_with selinux)"
- myconf="${myconf} $(use_with hal)"
-
- ## auth stuff
- myconf="${myconf} $(use_with policykit polkit)"
- myconf="${myconf} $(use_with sasl)"
-
- ## other
- myconf="${myconf} $(use_enable nls)"
- myconf="${myconf} $(use_with python)"
-
- ## stuff we don't yet support
- myconf="${myconf} --without-devkit"
- myconf="${myconf} --without-capng"
- myconf="${myconf} --without-netcf"
-
- econf \
- ${myconf} \
- --with-remote \
- --disable-iptables-lokkit \
- --localstatedir=/var \
- --with-remote-pid-file=/var/run/libvirtd.pid
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
- mv "${D}"/usr/share/doc/{${PN}-python*,${P}/python}
-
- newinitd "${FILESDIR}/libvirtd.init" libvirtd
- newconfd "${FILESDIR}/libvirtd.confd" libvirtd
-
- keepdir /var/lib/libvirt/images
-}
-
-pkg_preinst() {
- # we only ever want to generate this once
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
- fi
-}
-
-pkg_postinst() {
- use python && python_mod_optimize $(python_get_sitedir)/libvirt.py
-
- elog "To allow normal users to connect to libvirtd you must change the"
- elog " unix sock group and/or perms in /etc/libvirt/libvirtd.conf"
- elog
- ewarn "If you have a DNS server setup on your machine, you will have"
- ewarn "to configure /etc/dnsmasq.conf to enable the following settings: "
- ewarn " bind-interfaces"
- ewarn " interface or except-interface"
- elog
- ewarn "Otherwise you might have issues with your existing DNS server."
-}
-
-pkg_postrm() {
- use python && python_mod_cleanup
-}
diff --git a/app-emulation/libvirt/libvirt-0.7.4-r1.ebuild b/app-emulation/libvirt/libvirt-0.7.4-r1.ebuild
deleted file mode 100644
index d747b7273d3e..000000000000
--- a/app-emulation/libvirt/libvirt-0.7.4-r1.ebuild
+++ /dev/null
@@ -1,162 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.7.4-r1.ebuild,v 1.2 2009/12/23 06:01:52 ramereth Exp $
-
-EAPI="2"
-
-inherit eutils python
-
-DESCRIPTION="C toolkit to manipulate virtual machines"
-HOMEPAGE="http://www.libvirt.org/"
-SRC_URI="http://libvirt.org/sources/${P}.tar.gz"
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="avahi caps iscsi kvm +libvirtd lvm +lxc +network nfs one nls numa openvz \
- parted phyp policykit python qemu sasl selinux uml virtualbox xen udev"
-# devicekit isn't in portage
-
-RDEPEND="sys-libs/readline
- sys-libs/ncurses
- net-misc/curl
- >=dev-libs/libxml2-2.5
- >=net-libs/gnutls-1.0.25
- dev-lang/python
- sys-fs/sysfsutils
- sys-apps/util-linux
- >=net-analyzer/netcat6-1.0-r2
- avahi? ( >=net-dns/avahi-0.6 )
- caps? ( sys-libs/libcap-ng )
- iscsi? ( sys-block/open-iscsi )
- kvm? ( app-emulation/qemu-kvm )
- libvirtd? ( net-misc/bridge-utils )
- lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
- nfs? ( net-fs/nfs-utils )
- numa? ( sys-process/numactl )
- one? ( dev-libs/xmlrpc-c )
- openvz? ( sys-kernel/openvz-sources )
- parted? ( >=sys-apps/parted-1.8 )
- phyp? ( net-libs/libssh2 )
- policykit? ( >=sys-auth/policykit-0.6 )
- qemu? ( || ( app-emulation/qemu-kvm >=app-emulation/qemu-0.10.0 ) )
- sasl? ( dev-libs/cyrus-sasl )
- selinux? ( sys-libs/libselinux )
- virtualbox? ( || ( >=app-emulation/virtualbox-ose-2.2.0 >=app-emulation/virtualbox-bin-2.2.0 ) )
- xen? ( app-emulation/xen-tools app-emulation/xen )
- udev? ( >=sys-fs/udev-145 >=x11-libs/libpciaccess-0.10.9 )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- nls? ( sys-devel/gettext )"
-
-src_configure() {
- local myconf=""
-
- ## enable/disable daemon, otherwise client only utils
- myconf="${myconf} $(use_with libvirtd)"
-
- ## enable/disable the daemon using avahi to find VMs
- myconf="${myconf} $(use_with avahi)"
-
- ## hypervisors on the local host
- myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)"
- if ! use policykit && use xen; then
- myconf="${myconf} --with-xen-proxy"
- fi
- myconf="${myconf} $(use_with openvz)"
- myconf="${myconf} $(use_with lxc)"
- myconf="${myconf} $(use_with virtualbox vbox)"
- myconf="${myconf} $(use_with uml)"
- if use qemu || use kvm ; then
- myconf="${myconf} --with-qemu"
- else
- myconf="${myconf} --without-qemu"
- fi
- # doesn't belong with hypervisors but links to libvirtd for some reason
- myconf="${myconf} $(use_with one)"
-
- ## hypervisor protocols
- myconf="${myconf} $(use_with phyp)"
- myconf="${myconf} --with-esx"
-
- ## additional host drivers
- myconf="${myconf} $(use_with network)"
- myconf="${myconf} --with-storage-fs"
- myconf="${myconf} $(use_with lvm storage-lvm)"
- myconf="${myconf} $(use_with iscsi storage-iscsi)"
- myconf="${myconf} $(use_with parted storage-disk)"
- myconf="${myconf} $(use_with lvm storage-mpath)"
- myconf="${myconf} $(use_with numa numactl)"
- myconf="${myconf} $(use_with selinux)"
-
- # udev for device support details
- myconf="${myconf} $(use_with udev)"
-
- # linux capability support so we don't need privileged accounts
- myconf="${myconf} $(use_with caps capng)"
-
- ## auth stuff
- myconf="${myconf} $(use_with policykit polkit)"
- myconf="${myconf} $(use_with sasl)"
-
- ## other
- myconf="${myconf} $(use_enable nls)"
- myconf="${myconf} $(use_with python)"
-
- ## stuff we don't yet support
- myconf="${myconf} --without-devkit"
- myconf="${myconf} --without-netcf"
-
- # we use udev over hal
- myconf="${myconf} --without-hal"
-
- econf \
- ${myconf} \
- --with-remote \
- --disable-iptables-lokkit \
- --localstatedir=/var \
- --with-remote-pid-file=/var/run/libvirtd.pid
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
- mv "${D}"/usr/share/doc/{${PN}-python*,${P}/python}
-
- newinitd "${FILESDIR}/libvirtd.init" libvirtd
- newconfd "${FILESDIR}/libvirtd.confd" libvirtd
-
- keepdir /var/lib/libvirt/images
-}
-
-pkg_preinst() {
- # we only ever want to generate this once
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
- fi
-}
-
-pkg_postinst() {
- use python && python_mod_optimize $(python_get_sitedir)/libvirt.py
-
- elog "To allow normal users to connect to libvirtd you must change the"
- elog " unix sock group and/or perms in /etc/libvirt/libvirtd.conf"
- elog
- elog "For the basic networking support (bridged and routed networks)"
- elog "you don't need any extra software. For more complex network modes"
- elog "including but not limited to NATed network, you'll need the"
- elog "following packages":
- elog
- elog " net-dns/dnsmasq"
- elog " net-firewall/iptables"
- elog " net-firewall/ebtables"
- elog
- ewarn "If you have a DNS server setup on your machine, you will have"
- ewarn "to configure /etc/dnsmasq.conf to enable the following settings: "
- ewarn " bind-interfaces"
- ewarn " interface or except-interface"
- elog
- ewarn "Otherwise you might have issues with your existing DNS server."
-}
-
-pkg_postrm() {
- use python && python_mod_cleanup
-}
diff --git a/app-emulation/libvirt/libvirt-0.7.4.ebuild b/app-emulation/libvirt/libvirt-0.7.4.ebuild
deleted file mode 100644
index 75ab2d54825a..000000000000
--- a/app-emulation/libvirt/libvirt-0.7.4.ebuild
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.7.4.ebuild,v 1.2 2009/12/23 06:01:52 ramereth Exp $
-
-EAPI="2"
-
-inherit eutils python
-
-DESCRIPTION="C toolkit to manipulate virtual machines"
-HOMEPAGE="http://www.libvirt.org/"
-SRC_URI="http://libvirt.org/sources/${P}.tar.gz"
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="avahi caps iscsi kvm +libvirtd lvm +lxc +network nfs one nls numa openvz \
- parted phyp policykit python qemu sasl selinux uml virtualbox xen udev"
-# devicekit isn't in portage
-
-RDEPEND="sys-libs/readline
- sys-libs/ncurses
- net-misc/curl
- >=dev-libs/libxml2-2.5
- >=net-libs/gnutls-1.0.25
- dev-lang/python
- sys-fs/sysfsutils
- sys-apps/util-linux
- >=net-analyzer/netcat6-1.0-r2
- avahi? ( >=net-dns/avahi-0.6 )
- caps? ( sys-libs/libcap-ng )
- iscsi? ( sys-block/open-iscsi )
- kvm? ( app-emulation/qemu-kvm )
- libvirtd? ( net-misc/bridge-utils )
- lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
- network? ( net-dns/dnsmasq net-firewall/iptables )
- nfs? ( net-fs/nfs-utils )
- numa? ( sys-process/numactl )
- one? ( dev-libs/xmlrpc-c )
- openvz? ( sys-kernel/openvz-sources )
- parted? ( >=sys-apps/parted-1.8 )
- phyp? ( net-libs/libssh2 )
- policykit? ( >=sys-auth/policykit-0.6 )
- qemu? ( || ( app-emulation/qemu-kvm >=app-emulation/qemu-0.10.0 ) )
- sasl? ( dev-libs/cyrus-sasl )
- selinux? ( sys-libs/libselinux )
- virtualbox? ( || ( >=app-emulation/virtualbox-ose-2.2.0 >=app-emulation/virtualbox-bin-2.2.0 ) )
- xen? ( app-emulation/xen-tools app-emulation/xen )
- udev? ( >=sys-fs/udev-145 >=x11-libs/libpciaccess-0.10.9 )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- nls? ( sys-devel/gettext )"
-
-src_configure() {
- local myconf=""
-
- ## enable/disable daemon, otherwise client only utils
- myconf="${myconf} $(use_with libvirtd)"
-
- ## enable/disable the daemon using avahi to find VMs
- myconf="${myconf} $(use_with avahi)"
-
- ## hypervisors on the local host
- myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)"
- if ! use policykit && use xen; then
- myconf="${myconf} --with-xen-proxy"
- fi
- myconf="${myconf} $(use_with openvz)"
- myconf="${myconf} $(use_with lxc)"
- myconf="${myconf} $(use_with virtualbox vbox)"
- myconf="${myconf} $(use_with uml)"
- if use qemu || use kvm ; then
- myconf="${myconf} --with-qemu"
- else
- myconf="${myconf} --without-qemu"
- fi
- # doesn't belong with hypervisors but links to libvirtd for some reason
- myconf="${myconf} $(use_with one)"
-
- ## hypervisor protocols
- myconf="${myconf} $(use_with phyp)"
- myconf="${myconf} --with-esx"
-
- ## additional host drivers
- myconf="${myconf} $(use_with network)"
- myconf="${myconf} --with-storage-fs"
- myconf="${myconf} $(use_with lvm storage-lvm)"
- myconf="${myconf} $(use_with iscsi storage-iscsi)"
- myconf="${myconf} $(use_with parted storage-disk)"
- myconf="${myconf} $(use_with lvm storage-mpath)"
- myconf="${myconf} $(use_with numa numactl)"
- myconf="${myconf} $(use_with selinux)"
-
- # udev for device support details
- myconf="${myconf} $(use_with udev)"
-
- # linux capability support so we don't need privileged accounts
- myconf="${myconf} $(use_with caps capng)"
-
- ## auth stuff
- myconf="${myconf} $(use_with policykit polkit)"
- myconf="${myconf} $(use_with sasl)"
-
- ## other
- myconf="${myconf} $(use_enable nls)"
- myconf="${myconf} $(use_with python)"
-
- ## stuff we don't yet support
- myconf="${myconf} --without-devkit"
- myconf="${myconf} --without-netcf"
-
- # we use udev over hal
- myconf="${myconf} --without-hal"
-
- econf \
- ${myconf} \
- --with-remote \
- --disable-iptables-lokkit \
- --localstatedir=/var \
- --with-remote-pid-file=/var/run/libvirtd.pid
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
- mv "${D}"/usr/share/doc/{${PN}-python*,${P}/python}
-
- newinitd "${FILESDIR}/libvirtd.init" libvirtd
- newconfd "${FILESDIR}/libvirtd.confd" libvirtd
-
- keepdir /var/lib/libvirt/images
-}
-
-pkg_preinst() {
- # we only ever want to generate this once
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
- fi
-}
-
-pkg_postinst() {
- use python && python_mod_optimize $(python_get_sitedir)/libvirt.py
-
- elog "To allow normal users to connect to libvirtd you must change the"
- elog " unix sock group and/or perms in /etc/libvirt/libvirtd.conf"
- elog
- ewarn "If you have a DNS server setup on your machine, you will have"
- ewarn "to configure /etc/dnsmasq.conf to enable the following settings: "
- ewarn " bind-interfaces"
- ewarn " interface or except-interface"
- elog
- ewarn "Otherwise you might have issues with your existing DNS server."
-}
-
-pkg_postrm() {
- use python && python_mod_cleanup
-}
diff --git a/app-emulation/libvirt/libvirt-0.7.4-r2.ebuild b/app-emulation/libvirt/libvirt-0.7.5.ebuild
index 61ea50f9854a..2860b72828db 100644
--- a/app-emulation/libvirt/libvirt-0.7.4-r2.ebuild
+++ b/app-emulation/libvirt/libvirt-0.7.5.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.7.4-r2.ebuild,v 1.2 2009/12/23 06:01:52 ramereth Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.7.5.ebuild,v 1.1 2009/12/23 16:58:55 flameeyes Exp $
-BACKPORTS=1
+BACKPORTS=
EAPI="2"
@@ -11,18 +11,22 @@ inherit eutils python
DESCRIPTION="C toolkit to manipulate virtual machines"
HOMEPAGE="http://www.libvirt.org/"
SRC_URI="http://libvirt.org/sources/${P}.tar.gz
- mirror://gentoo/${P}-backports-${BACKPORTS}.tar.bz2"
+ ${BACKPORTS:+mirror://gentoo/${P}-backports-${BACKPORTS}.tar.bz2}"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="avahi caps iscsi kvm +libvirtd lvm +lxc +network nfs one nls numa openvz \
+IUSE="avahi caps iscsi +libvirtd lvm +lxc +network nfs one nls numa openvz \
parted phyp policykit python qemu sasl selinux uml virtualbox xen udev"
# devicekit isn't in portage
+# Some tests are simply broken in the released tarball, ignore them
+# for now.
+RESTRICT=test
+
RDEPEND="sys-libs/readline
sys-libs/ncurses
- net-misc/curl
- >=dev-libs/libxml2-2.5
+ >=net-misc/curl-7.18.0
+ >=dev-libs/libxml2-2.7.6
>=net-libs/gnutls-1.0.25
dev-lang/python
sys-fs/sysfsutils
@@ -31,7 +35,6 @@ RDEPEND="sys-libs/readline
avahi? ( >=net-dns/avahi-0.6 )
caps? ( sys-libs/libcap-ng )
iscsi? ( sys-block/open-iscsi )
- kvm? ( app-emulation/qemu-kvm )
libvirtd? ( net-misc/bridge-utils )
lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
nfs? ( net-fs/nfs-utils )
@@ -52,7 +55,8 @@ DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )"
src_prepare() {
- EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" epatch
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" epatch
}
src_configure() {
@@ -73,11 +77,7 @@ src_configure() {
myconf="${myconf} $(use_with lxc)"
myconf="${myconf} $(use_with virtualbox vbox)"
myconf="${myconf} $(use_with uml)"
- if use qemu || use kvm ; then
- myconf="${myconf} --with-qemu"
- else
- myconf="${myconf} --without-qemu"
- fi
+ myconf="${myconf} $(use_with qemu)"
# doesn't belong with hypervisors but links to libvirtd for some reason
myconf="${myconf} $(use_with one)"
@@ -110,7 +110,6 @@ src_configure() {
myconf="${myconf} $(use_with python)"
## stuff we don't yet support
- myconf="${myconf} --without-devkit"
myconf="${myconf} --without-netcf"
# we use udev over hal
@@ -118,18 +117,27 @@ src_configure() {
econf \
${myconf} \
+ --docdir=/usr/share/doc/${PF} \
--with-remote \
- --disable-iptables-lokkit \
--localstatedir=/var \
--with-remote-pid-file=/var/run/libvirtd.pid
}
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
- mv "${D}"/usr/share/doc/{${PN}-python*,${P}/python}
+src_test() {
+ # Explicitly allow parallel build of tests
+ emake check || die "tests failed"
+}
- newinitd "${FILESDIR}/libvirtd.init" libvirtd
- newconfd "${FILESDIR}/libvirtd.confd" libvirtd
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ HTML_DIR=/usr/share/doc/${PF}/html \
+ DOCS_DIR=/usr/share/doc/${PF}/python \
+ EXAMPLE_DIR=/usr/share/doc/${PF}/python/examples \
+ || die "emake install failed"
+
+ newinitd "${FILESDIR}/libvirtd.init" libvirtd || die
+ newconfd "${FILESDIR}/libvirtd.confd" libvirtd || die
keepdir /var/lib/libvirt/images
}
diff --git a/app-emulation/libvirt/metadata.xml b/app-emulation/libvirt/metadata.xml
index 443face370d9..b230fd1d3c42 100644
--- a/app-emulation/libvirt/metadata.xml
+++ b/app-emulation/libvirt/metadata.xml
@@ -15,8 +15,6 @@
devices</flag>
<flag name='iscsi'>Add support for iSCSI (Internet SCSI) remote
storage</flag>
- <flag name='kvm'>Add support for <pkg>app-emulation/kvm</pkg> based
- virtual machines</flag>
<flag name='lvm'>Add support for the Logical Volume Manager
<pkg>sys-apps/lvm2</pkg></flag>
<flag name='lxc'>Add support for the Linux Containers</flag>