summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2009-05-27 22:34:30 +0000
committerDoug Goldstein <cardoe@gentoo.org>2009-05-27 22:34:30 +0000
commit8cddb3f35fef3f6be78d1e43b8923f9d32c9e1ec (patch)
tree77bf0fbcff22ea0bd3c0de60123c2b3cda730447 /app-emulation
parentAfter more than an year.. some kind of update. (diff)
downloadhistorical-8cddb3f35fef3f6be78d1e43b8923f9d32c9e1ec.tar.gz
historical-8cddb3f35fef3f6be78d1e43b8923f9d32c9e1ec.tar.bz2
historical-8cddb3f35fef3f6be78d1e43b8923f9d32c9e1ec.zip
Wrote a patch to support kvm-img and qemu-img. Also made the checks for either happen at run-time instead of build-time which will improve support for people. Submitted upstream at https://bugzilla.redhat.com/show_bug.cgi?id=502956 Additional changes include adding preliminary virtualbox support. Other misc ebuild clean ups
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog12
-rw-r--r--app-emulation/libvirt/Manifest16
-rw-r--r--app-emulation/libvirt/files/libvirt-0.6.3-kvm-img.patch270
-rw-r--r--app-emulation/libvirt/libvirt-0.6.3-r1.ebuild108
-rw-r--r--app-emulation/libvirt/metadata.xml2
5 files changed, 405 insertions, 3 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index e134c319a7b2..dea6cd797ddf 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,16 @@
# 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.23 2009/05/21 14:43:36 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.24 2009/05/27 22:34:30 cardoe Exp $
+
+*libvirt-0.6.3-r1 (27 May 2009)
+
+ 27 May 2009; Doug Goldstein <cardoe@gentoo.org> +libvirt-0.6.3-r1.ebuild,
+ +files/libvirt-0.6.3-kvm-img.patch:
+ Wrote a patch to support kvm-img and qemu-img. Also made the checks for
+ either happen at run-time instead of build-time which will improve support
+ for people. Submitted upstream at
+ https://bugzilla.redhat.com/show_bug.cgi?id=502956 Additional changes
+ include adding preliminary virtualbox support. Other misc ebuild clean ups
*libvirt-0.6.3 (21 May 2009)
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index 1b26bc4538ec..d4654caf753e 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX libvirt-0.4.4-binary-paths.patch 2947 RMD160 10d150facbe7baaefbba6ec4b0287050db8f31c8 SHA1 6f1f912e83f4090293f287068c2f97b9a973a145 SHA256 2a83c75d19291bf3ac7110f48b1b6929515005826fbd7dcbaf4377cb4afb3115
AUX libvirt-0.4.4-capabilities-kvm-path.patch 680 RMD160 42516e1ca91fa59f5c34079874be2af922afd8f6 SHA1 64c867dde6c75a6390af4f4176c5efedda2ae176 SHA256 7a8ae9cc24840132131903cb865338369b5ded3d9535cf911b0b0d77d49ababc
AUX libvirt-0.4.4-kvm-cdrom-fix.patch 1183 RMD160 35555fcee1bbe7550066450c7fcf1a8c20f3c73c SHA1 4a4c728630e645dee99e2625aa900e0099930590 SHA256 2f2573ba4969fb8c068ee8e1af7b60adc97a5caa7d26b58e3caa48ce3371b721
@@ -8,6 +11,7 @@ AUX libvirt-0.5.1-add-missing-permission-checks.patch 5538 RMD160 e531b32e1add74
AUX libvirt-0.5.1-libgnu-reposition.patch 478 RMD160 c8f567420dac122ec677a3a4d83e2b4adb0a9e94 SHA1 dd3aa57847cb2f61f0ebd5ae92b01094f22ad29e SHA256 4544c9608b775a3a1b1b4025aa411c8d4426cde3b4ecedff83d661cab685fdac
AUX libvirt-0.6.2-storage-fix.patch 529 RMD160 201adef5a0df14d79cec60133e7dfa6b9e37dc4f SHA1 d8f7c9b79b230ad921bee68f51dcde3b67c5b227 SHA256 a9b90df0671cfda5ba550617549ee4ad918a6c746c6cd38fdf56bb7f450f5b07
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 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
@@ -17,6 +21,14 @@ DIST libvirt-0.6.3.tar.gz 6999742 RMD160 2552878017665498013ca132f45ab3f6af0c82f
EBUILD libvirt-0.4.6-r1.ebuild 2426 RMD160 5bbf66a700ad57ea137b9ace65d6acc6b5efb64c SHA1 df87f8027d84059a199f98a87c4c7400f6ae91b0 SHA256 693c8facf12519b3423cbe197de1f35fa58a25bd8d6cce912ec1a01e363cab7b
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.ebuild 2869 RMD160 13feccad2c48a8c8a2fd31f700390accbe0132e3 SHA1 88ed24d66d0081bcba9e73190b1bea8d1c1a4aa6 SHA256 f9a369c53414c0b0b8f0c536a6d277be419ead42e955eefd2e6b173b05a981eb
-MISC ChangeLog 5381 RMD160 996ac5e749296e075b3d86f8b11a572410958bcd SHA1 63e3531af1b65ffa0cf055e3bdf490b8e5eb1944 SHA256 e77adc43e8dfa089a66ddccb872ee1c062462143cde9372e9e4d25f34d71c963
-MISC metadata.xml 1266 RMD160 e8c98e672f1a6a1e93865b1f845394cf9a914dd0 SHA1 af936d16dff48c69b837481f1c813e9a9b837828 SHA256 81bf0e5442c3d0d6a088d92c168cf7e38f13ccbb895b1c04d5f7583f642431fd
+MISC ChangeLog 5863 RMD160 5ec6832145daa112bdce825a9ed9b7b11ce6e473 SHA1 15ea4bf58f674056d047292f85f22cbf495ac6d9 SHA256 660b767859588b8397c9e9e19080307cfebadbc63e924f61635f5442a198b92e
+MISC metadata.xml 1353 RMD160 36de578449525a8b8f33d921d01416364faaccf0 SHA1 6a1b011e83012fd2c62c8dfd814ec5b1b161f1c0 SHA256 a99aa692710b75043bce13f3205f0cc6aa764182fcf5ac5b5253498b4979523c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.11 (GNU/Linux)
+
+iEYEARECAAYFAkodwAUACgkQoeSe8B0zEfxRSACeOYB/epILVgJIVloQWgCeLifs
+0NUAn36xCeCBEFnTQStLGMvhi4DXZAiD
+=7RDp
+-----END PGP SIGNATURE-----
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
new file mode 100644
index 000000000000..8d0ed091cb82
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-0.6.3-kvm-img.patch
@@ -0,0 +1,270 @@
+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/libvirt-0.6.3-r1.ebuild b/app-emulation/libvirt/libvirt-0.6.3-r1.ebuild
new file mode 100644
index 000000000000..5cda769a6804
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-0.6.3-r1.ebuild
@@ -0,0 +1,108 @@
+# 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-r1.ebuild,v 1.1 2009/05/27 22:34:30 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 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 )
+ openvz? ( sys-kernel/openvz-sources )
+ parted? ( >=sys-apps/parted-1.8 )
+ policykit? ( >=sys-auth/policykit-0.6 )
+ qemu? ( app-emulation/qemu )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( sys-libs/libselinux )
+ virtualbox? ( app-emulation/virtualbox-bin )
+ xen? ( app-emulation/xen-tools app-emulation/xen )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-kvm-85-argv-detection.patch" \
+ "${FILESDIR}/${P}-kvm-img.patch"
+ eautoreconf
+
+ # "${FILESDIR}/${PN}-0.6.2-storage-fix.patch" \
+}
+
+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) \
+ ${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 e516b1b3e8a2..64cb2c0e11f1 100644
--- a/app-emulation/libvirt/metadata.xml
+++ b/app-emulation/libvirt/metadata.xml
@@ -29,5 +29,7 @@
<flag name='xen'>Add support for <pkg>app-emulation/xen</pkg> based
virtual machines</flag>
<flag name='network'>Enable networking support for guests</flag>
+ <flag name='virtualbox'>Adds support for VirtualBox based virtual
+ machines</flag>
</use>
</pkgmetadata>