summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2009-05-28 16:27:25 +0000
committerDoug Goldstein <cardoe@gentoo.org>2009-05-28 16:27:25 +0000
commit77ac84d315420b5c3bd82625fbde73d7723356ad (patch)
tree1fd46f34f2d634bb1c982a40d0f7d34e54285ce5 /app-emulation
parentalpha/arm/ia64/s390/sh stable wrt #271096 (diff)
downloadhistorical-77ac84d315420b5c3bd82625fbde73d7723356ad.tar.gz
historical-77ac84d315420b5c3bd82625fbde73d7723356ad.tar.bz2
historical-77ac84d315420b5c3bd82625fbde73d7723356ad.zip
Support NUMA segmentation. Fix VirtualBox depend. Require QEMU 0.10.0 and higher for additional QEMU feature support. Several fixes from upstream.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog13
-rw-r--r--app-emulation/libvirt/Manifest16
-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-refresh-qemu-caps.patch76
-rw-r--r--app-emulation/libvirt/libvirt-0.6.3-r2.ebuild120
-rw-r--r--app-emulation/libvirt/metadata.xml2
9 files changed, 400 insertions, 6 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index dea6cd797ddf..64c2216de478 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,17 @@
# 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.24 2009/05/27 22:34:30 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.25 2009/05/28 16:27:25 cardoe Exp $
+
+*libvirt-0.6.3-r2 (28 May 2009)
+
+ 28 May 2009; Doug Goldstein <cardoe@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,
+ +libvirt-0.6.3-r2.ebuild, +files/libvirt-0.6.3-hostdev-managed.patch,
+ +files/libvirt-0.6.3-refresh-qemu-caps.patch, metadata.xml:
+ Support NUMA segmentation. Fix VirtualBox depend. Require QEMU 0.10.0 and
+ higher for additional QEMU feature support. Several fixes from upstream.
*libvirt-0.6.3-r1 (27 May 2009)
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index d4654caf753e..12530eec3ef3 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -9,9 +9,14 @@ AUX libvirt-0.4.6-parallel-build-fix.patch 686 RMD160 4abcef21401ba55f37504cce67
AUX libvirt-0.4.6-qemu-img-name.patch 811 RMD160 821ad55830f4724fc4d3314d58d7ea7971f0060c SHA1 1e154cf2a0522db05fd202ebddafb530e714c657 SHA256 fe0eb8a43a79c7c3d764387170addb3d490673d5e942ea1dd7b7633da4b11b7d
AUX libvirt-0.5.1-add-missing-permission-checks.patch 5538 RMD160 e531b32e1add746a1d873f1005841349b4a62fa4 SHA1 573ca31d3c55509c076301b91fae9bed9f4abd68 SHA256 c5b5c323f4a97b8dee0324ca44c97fd3263e72b9ea58baff808c226ff9d04bd3
AUX libvirt-0.5.1-libgnu-reposition.patch 478 RMD160 c8f567420dac122ec677a3a4d83e2b4adb0a9e94 SHA1 dd3aa57847cb2f61f0ebd5ae92b01094f22ad29e SHA256 4544c9608b775a3a1b1b4025aa411c8d4426cde3b4ecedff83d661cab685fdac
+AUX libvirt-0.6.2-enable-qemu-0-10-migration.patch 1568 RMD160 9eb075ad7df6e438b342b9d35e6acfe2e9939c28 SHA1 81804cee44736fe815b7330b482a76e74468523d SHA256 fa1b201eefedb7a053c5a58f4dcebf5b8479c8471bfd8e5c027ffd32b31c872e
+AUX libvirt-0.6.2-fix-nosource-label.patch 523 RMD160 5dfb9a5a4612a39ef36da4a31804ae43bd114689 SHA1 f56665d70345f5d461b787d38f614edb8f096d22 SHA256 67be1401e0c5504a1bd39a703ca7a4aa809ed78e7e2e2c1a4a3762124add610d
+AUX libvirt-0.6.2-shared-readonly-label.patch 2501 RMD160 3318374f4aa399a433d6e780d557b3d9101cca75 SHA1 d4820dd4464ca948c70eb02c7d5bc99e200c4f7e SHA256 9e8ce40544035b9539b5680ee8878af22669305a36fa96371635646a6796b866
AUX libvirt-0.6.2-storage-fix.patch 529 RMD160 201adef5a0df14d79cec60133e7dfa6b9e37dc4f SHA1 d8f7c9b79b230ad921bee68f51dcde3b67c5b227 SHA256 a9b90df0671cfda5ba550617549ee4ad918a6c746c6cd38fdf56bb7f450f5b07
+AUX libvirt-0.6.3-hostdev-managed.patch 1555 RMD160 43e43885281d672f6d50221db4c92f55f1b34fa8 SHA1 8fb24ef22a59d835a7478539f5e32021092a3b93 SHA256 de786ab66a9c0fa300ebf28cb6d085dea065be25df034efa54e01aef75d4b9d1
AUX libvirt-0.6.3-kvm-85-argv-detection.patch 2965 RMD160 2da23e5716286923d8b6ee006064877199d474b4 SHA1 86224a000b9c19aff7f65cabaf6da95c7c9b1c3f SHA256 5b6d0739de10766d834e7db2cf72e713344ac0ce4e5a8fe8632fab7301588d89
AUX libvirt-0.6.3-kvm-img.patch 9798 RMD160 f656b7a23c03f40d4f19ef9d02b531cca2d6d01b SHA1 407fbcf9278f4624a273f28ad07faa480c6a29a2 SHA256 58fc0f213e326220842759a46bca9242bf11b0acf0d54dd314062767c05dcd6e
+AUX libvirt-0.6.3-refresh-qemu-caps.patch 2456 RMD160 0ead0b48db4f9d242fdc8b7669f019bd7cf88531 SHA1 7b53245b4f8c6d015ff81463f709207702e597a8 SHA256 5080be32e2ecfe00fac2cff36036b1d3b05028c39677b2840b87d6ab10213b20
AUX libvirtd.confd 476 RMD160 63b92da0cf0d589c1c6e76551982deb6b5fc8f9a SHA1 5b76082bb28705606758880c19af922dde1ccb01 SHA256 ff2c94d2a64058152be669256d8d2e241cde4356a77bd653eac9fa3b084666f6
AUX libvirtd.init 2045 RMD160 b544578c242c6f84e2cf07682a06ce261bf40b8a SHA1 81976137c43f6b507e27ac926a6d7947e1a329d3 SHA256 96cbdf8e68a171d170f91167a4217a366325ca668b9e2621ec6800fd35d42c5c
DIST libvirt-0.4.6.tar.gz 5255397 RMD160 7a59cf7b678148c380e20e57f4d5d323f5aeb6b6 SHA1 dd6994e09789e19679cae4bdd65f2d7aea9cf8d0 SHA256 70049e309632718af75cd11116063ade45eb2879eb9e7ac7c6106559d344a37a
@@ -22,13 +27,14 @@ EBUILD libvirt-0.4.6-r1.ebuild 2426 RMD160 5bbf66a700ad57ea137b9ace65d6acc6b5efb
EBUILD libvirt-0.5.1.ebuild 2905 RMD160 6733abae4fbaf18cc20dd9bef5b40e752b9deefa SHA1 d22071db59b07bc0ce1f29cde6a6403ca5a5d68f SHA256 e4a746ae4aeb4f4590b38226acaee9df9ec84590b7b40eb17c3fc11d8bddc801
EBUILD libvirt-0.6.2.ebuild 2849 RMD160 8141f7fdb011bb429835d7cbc3a06edcb989168e SHA1 b35409b28d0ec4a083f0ce7eb8781c061ede7f45 SHA256 aa03f0f69c23602034a895c0ba485b36b67174c0c9ce9987a4775f832e7c54ba
EBUILD libvirt-0.6.3-r1.ebuild 2987 RMD160 4493936640e06682a80c41bded9eabfc77ebccd4 SHA1 da25bcea725f0cb7a45fb18363243b2cd5f0c52b SHA256 0feda2adfa6cd507023dd7f4f54b1b6ccb608a55eb5ca1cac31b651f3092e428
+EBUILD libvirt-0.6.3-r2.ebuild 3713 RMD160 2f096a98706147aa4524a50190db3603fdab3831 SHA1 17e30f16be072f54e023825431a0b5e3129064cc SHA256 7afab22c8571f9ed626b7c4832b88cf83c2d38cfbcf8bcc18f117a25ba2e25ea
EBUILD libvirt-0.6.3.ebuild 2869 RMD160 13feccad2c48a8c8a2fd31f700390accbe0132e3 SHA1 88ed24d66d0081bcba9e73190b1bea8d1c1a4aa6 SHA256 f9a369c53414c0b0b8f0c536a6d277be419ead42e955eefd2e6b173b05a981eb
-MISC ChangeLog 5863 RMD160 5ec6832145daa112bdce825a9ed9b7b11ce6e473 SHA1 15ea4bf58f674056d047292f85f22cbf495ac6d9 SHA256 660b767859588b8397c9e9e19080307cfebadbc63e924f61635f5442a198b92e
-MISC metadata.xml 1353 RMD160 36de578449525a8b8f33d921d01416364faaccf0 SHA1 6a1b011e83012fd2c62c8dfd814ec5b1b161f1c0 SHA256 a99aa692710b75043bce13f3205f0cc6aa764182fcf5ac5b5253498b4979523c
+MISC ChangeLog 6390 RMD160 2523c0d64d5235a8997360e2f9180926cbd755b0 SHA1 7232e9eb92aa432f4f95f76ca82b9ac407e9ec79 SHA256 b6b7a668706491001467cb42fef32b2f53d3b7485ee64893dc761bb0d0eaf5ac
+MISC metadata.xml 1449 RMD160 0336423f85fef23bc6c85866649eeb089ad5010d SHA1 159a4f62926dcdfdc09d646d7854741d3dc7bb24 SHA256 f3a5571f781eb774cd57d873b24c8058704ab4fb2c63ce25ae7caee87ed9db12
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
-iEYEARECAAYFAkodwAUACgkQoeSe8B0zEfxRSACeOYB/epILVgJIVloQWgCeLifs
-0NUAn36xCeCBEFnTQStLGMvhi4DXZAiD
-=7RDp
+iEYEARECAAYFAkoeu74ACgkQoeSe8B0zEfyScgCfR17Sb89sUzxsTDiuqpF/AYqF
+Mi8AoIPzwKSj0QgbKM/+HxJgbmoZF/4/
+=CpLu
-----END PGP SIGNATURE-----
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
new file mode 100644
index 000000000000..1e1a1c292fdb
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-0.6.2-enable-qemu-0-10-migration.patch
@@ -0,0 +1,45 @@
+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
new file mode 100644
index 000000000000..c0b0498fc40f
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-0.6.2-fix-nosource-label.patch
@@ -0,0 +1,13 @@
+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
new file mode 100644
index 000000000000..e962d18d0cd6
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-0.6.2-shared-readonly-label.patch
@@ -0,0 +1,76 @@
+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
new file mode 100644
index 000000000000..4d62aaadb725
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-0.6.3-hostdev-managed.patch
@@ -0,0 +1,45 @@
+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-refresh-qemu-caps.patch b/app-emulation/libvirt/files/libvirt-0.6.3-refresh-qemu-caps.patch
new file mode 100644
index 000000000000..804d54ec1ef5
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-0.6.3-refresh-qemu-caps.patch
@@ -0,0 +1,76 @@
+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/libvirt-0.6.3-r2.ebuild b/app-emulation/libvirt/libvirt-0.6.3-r2.ebuild
new file mode 100644
index 000000000000..894ebb830dea
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-0.6.3-r2.ebuild
@@ -0,0 +1,120 @@
+# 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.6.3-r2.ebuild,v 1.1 2009/05/28 16:27:25 cardoe Exp $
+
+EAPI="2"
+
+inherit eutils autotools confutils
+
+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 iscsi hal kvm lvm +lxc +network nls numa openvz policykit \
+ parted qemu sasl selinux uml virtualbox xen"
+# devicekit isn't in portage
+
+RDEPEND="sys-libs/readline
+ sys-libs/ncurses
+ >=dev-libs/libxml2-2.5
+ >=net-libs/gnutls-1.0.25
+ dev-lang/python
+ sys-fs/sysfsutils
+ net-analyzer/netcat
+ avahi? ( >=net-dns/avahi-0.6 )
+ iscsi? ( sys-block/open-iscsi )
+ kvm? ( app-emulation/kvm )
+ lvm? ( sys-fs/lvm2 )
+ network? ( net-misc/bridge-utils net-dns/dnsmasq net-firewall/iptables )
+ numa? ( sys-process/numactl )
+ openvz? ( sys-kernel/openvz-sources )
+ parted? ( >=sys-apps/parted-1.8 )
+ policykit? ( >=sys-auth/policykit-0.6 )
+ qemu? ( >=app-emulation/qemu-0.10.0 )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( sys-libs/libselinux )
+ virtualbox? ( >=app-emulation/virtualbox-bin-2.2.0 )
+ xen? ( app-emulation/xen-tools app-emulation/xen )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_prepare() {
+ # Fix argv handling for KVM 85 and newer
+ epatch "${FILESDIR}/${P}-kvm-85-argv-detection.patch"
+ # Patch sent upstream for working with kvm-img
+ epatch "${FILESDIR}/${P}-kvm-img.patch"
+ # upstream patch. fix shared/read-only disk labeling
+ epatch "${FILESDIR}/${PN}-0.6.2-shared-readonly-label.patch"
+ # upstream patch. fix <hostdev managed='yes'>
+ epatch "${FILESDIR}/${P}-hostdev-managed.patch"
+ # upstream patch. refresh qemu caps when getCapabilities is called
+ epatch "${FILESDIR}/${P}-refresh-qemu-caps.patch"
+ # upstream patch. enable migration support which appeared in QEMU 0.10.0
+ epatch "${FILESDIR}/${PN}-0.6.2-enable-qemu-0-10-migration.patch"
+ # upstream patch. don't try to label a disk with no path (empty cdrom)
+ epatch "${FILESDIR}/${PN}-0.6.2-fix-nosource-label.patch"
+
+ eautoreconf
+}
+
+pkg_setup() {
+ confutils_require_any lxc kvm openvz qemu uml virtualbox xen
+}
+
+src_configure() {
+ local my_conf=""
+ if use qemu || use kvm ; then
+ my_conf="--with-qemu"
+ else
+ my_conf="--without-qemu"
+ fi
+
+ econf \
+ $(use_with iscsi storage-iscsi) \
+ $(use_with lvm storage-lvm) \
+ $(use_with parted storage-disk) \
+ $(use_with lxc) \
+ $(use_with openvz) \
+ $(use_with uml) \
+ $(use_with virtualbox vbox) \
+ $(use_with xen) \
+ $(use_with xen xen-inotify) \
+ $(use_with avahi) \
+ $(use_with hal) \
+ $(use_with sasl) \
+ $(use_with network) \
+ $(use_with policykit polkit) \
+ $(use_with selinux) \
+ $(use_enable nls) \
+ $(use_with numa numactl) \
+ ${my_conf} \
+ --without-devkit \
+ --with-remote \
+ --disable-iptables-lokkit \
+ --localstatedir=/var \
+ --with-remote-pid-file=/var/run/libvirtd.pid
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake instal lfailed"
+ 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_postinst() {
+ 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."
+}
diff --git a/app-emulation/libvirt/metadata.xml b/app-emulation/libvirt/metadata.xml
index 64cb2c0e11f1..e065e2a19c4a 100644
--- a/app-emulation/libvirt/metadata.xml
+++ b/app-emulation/libvirt/metadata.xml
@@ -31,5 +31,7 @@
<flag name='network'>Enable networking support for guests</flag>
<flag name='virtualbox'>Adds support for VirtualBox based virtual
machines</flag>
+ <flag name='numa'>Use NUMA for memory segmenting via
+ <pkg>sys-process/numactl</pkg></flag>
</use>
</pkgmetadata>