Compare commits

...

10 Commits

Author SHA1 Message Date
Mark McLoughlin
1c41ce6f30 * Wed May 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-5.fc11
- Fix handling of <hostdev managed='yes'> (bug #499386)
2009-05-06 15:51:47 +00:00
Daniel P. Berrange
c6db79d97f Fix labelling of shared/readonly disks (rhbz #493692) 2009-05-05 13:01:15 +00:00
Daniel Veillard
7b7f8cc27f - Fix missing directories in spec (#496945 and gtk-doc)
Daniel
2009-04-28 10:57:59 +00:00
Mark McLoughlin
a9cc41b082 * Thu Apr 16 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-2.fc11
- Fix qemu drive format specification (#496092)
2009-04-16 15:26:45 +00:00
Jesse Keating
ce1593f88f Initialize branch F-11 for libvirt 2009-04-15 07:13:06 +00:00
Daniel Veillard
f5edf79c95 libvirt-0.6.2 release
remove old patches
update the svirt sound patch
Daniel
2009-04-03 15:52:11 +00:00
Daniel P. Berrange
b59e64bf44 Fix dumb typo in previous patch 2009-04-03 15:18:03 +00:00
Daniel P. Berrange
a09fc2658a Disable sound cards when running sVirt 2009-03-17 16:00:54 +00:00
Daniel P. Berrange
a008fcf27e Don't relabel shared/readonly disks for sVirt 2009-03-17 15:31:31 +00:00
Daniel P. Berrange
511f6cd625 - Fix memory allocation for xend lookup
- Avoid crash if storage volume deletion fails
- Fix multiple FD leaks
- Fix bug in dispatch FD events when a callback is marked deleted
- Fix parsing of storage volume owner/group/mode
- Fix memory allocation for virDomainGetVcpus RPC handler
- Avoid deadlock in setting vCPU count
- Use correct driver name in Xen block detach
2009-03-17 10:29:42 +00:00
10 changed files with 304 additions and 296 deletions

View File

@@ -5,3 +5,4 @@ x86_64
libvirt-*.tar.gz
libvirt-0.6.0.tar.gz
libvirt-0.6.1.tar.gz
libvirt-0.6.2.tar.gz

1
branch Normal file
View File

@@ -0,0 +1 @@
F-11

View File

@@ -1,11 +0,0 @@
diff -rup libvirt-0.6.1.orig/src/storage_driver.c libvirt-0.6.1.new/src/storage_driver.c
--- libvirt-0.6.1.orig/src/storage_driver.c 2009-02-16 03:43:41.000000000 -0500
+++ libvirt-0.6.1.new/src/storage_driver.c 2009-03-06 08:02:51.000000000 -0500
@@ -1296,7 +1296,6 @@ storageVolumeDelete(virStorageVolPtr obj
ret = 0;
cleanup:
- virStorageVolDefFree(vol);
if (pool)
virStoragePoolObjUnlock(pool);
return ret;

View File

@@ -1,277 +0,0 @@
diff -r 961d4b1ca1d3 qemud/libvirtd_qemu.aug
--- a/qemud/libvirtd_qemu.aug Wed Mar 04 13:17:44 2009 +0000
+++ b/qemud/libvirtd_qemu.aug Thu Mar 05 14:22:50 2009 +0000
@@ -27,6 +27,8 @@ module Libvirtd_qemu =
| str_entry "vnc_tls_x509_cert_dir"
| bool_entry "vnc_tls_x509_verify"
| str_entry "vnc_password"
+ | bool_entry "vnc_sasl"
+ | str_entry "vnc_sasl_dir"
(* Each enty in the config is one of the following three ... *)
let entry = vnc_entry
diff -r 961d4b1ca1d3 qemud/test_libvirtd_qemu.aug
--- a/qemud/test_libvirtd_qemu.aug Wed Mar 04 13:17:44 2009 +0000
+++ b/qemud/test_libvirtd_qemu.aug Thu Mar 05 14:22:50 2009 +0000
@@ -60,6 +60,25 @@ vnc_tls_x509_verify = 1
# example here before you set this
#
vnc_password = \"XYZ12345\"
+
+
+# Enable use of SASL encryption on the VNC server. This requires
+# a VNC client which supports the SASL protocol extension.
+# Examples include vinagre, virt-viewer and virt-manager
+# itself. UltraVNC, RealVNC, TightVNC do not support this
+#
+# It is necessary to configure /etc/sasl2/qemu.conf to choose
+# the desired SASL plugin (eg, GSSPI for Kerberos)
+#
+vnc_sasl = 1
+
+
+# The default SASL configuration file is located in /etc/sasl2/
+# When running libvirtd unprivileged, it may be desirable to
+# override the configs in this location. Set this parameter to
+# point to the directory, and create a qemu.conf in that location
+#
+vnc_sasl_dir = \"/some/directory/sasl2\"
"
test Libvirtd_qemu.lns get conf =
@@ -123,3 +142,22 @@ vnc_password = \"XYZ12345\"
{ "#comment" = "example here before you set this" }
{ "#comment" = "" }
{ "vnc_password" = "XYZ12345" }
+{ "#empty" }
+{ "#empty" }
+{ "#comment" = "Enable use of SASL encryption on the VNC server. This requires" }
+{ "#comment" = "a VNC client which supports the SASL protocol extension." }
+{ "#comment" = "Examples include vinagre, virt-viewer and virt-manager" }
+{ "#comment" = "itself. UltraVNC, RealVNC, TightVNC do not support this" }
+{ "#comment" = "" }
+{ "#comment" = "It is necessary to configure /etc/sasl2/qemu.conf to choose" }
+{ "#comment" = "the desired SASL plugin (eg, GSSPI for Kerberos)" }
+{ "#comment" = "" }
+{ "vnc_sasl" = "1" }
+{ "#empty" }
+{ "#empty" }
+{ "#comment" = "The default SASL configuration file is located in /etc/sasl2/" }
+{ "#comment" = "When running libvirtd unprivileged, it may be desirable to" }
+{ "#comment" = "override the configs in this location. Set this parameter to" }
+{ "#comment" = "point to the directory, and create a qemu.conf in that location" }
+{ "#comment" = "" }
+{ "vnc_sasl_dir" = "/some/directory/sasl2" }
diff -r 961d4b1ca1d3 src/qemu.conf
--- a/src/qemu.conf Wed Mar 04 13:17:44 2009 +0000
+++ b/src/qemu.conf Thu Mar 05 14:22:50 2009 +0000
@@ -60,6 +60,27 @@
# vnc_password = "XYZ12345"
+# Enable use of SASL encryption on the VNC server. This requires
+# a VNC client which supports the SASL protocol extension.
+# Examples include vinagre, virt-viewer and virt-manager
+# itself. UltraVNC, RealVNC, TightVNC do not support this
+#
+# It is necessary to configure /etc/sasl2/qemu.conf to choose
+# the desired SASL plugin (eg, GSSPI for Kerberos)
+#
+# vnc_sasl = 1
+
+
+# The default SASL configuration file is located in /etc/sasl2/
+# When running libvirtd unprivileged, it may be desirable to
+# override the configs in this location. Set this parameter to
+# point to the directory, and create a qemu.conf in that location
+#
+# vnc_sasl_dir = "/some/directory/sasl2"
+
+
+
+
# The default security driver is SELinux. If SELinux is disabled
# on the host, then the security driver will automatically disable
# itself. If you wish to disable QEMU SELinux security driver while
diff -r 961d4b1ca1d3 src/qemu_conf.c
--- a/src/qemu_conf.c Wed Mar 04 13:17:44 2009 +0000
+++ b/src/qemu_conf.c Thu Mar 05 14:22:50 2009 +0000
@@ -161,6 +161,21 @@ int qemudLoadDriverConfig(struct qemud_d
}
}
+ p = virConfGetValue (conf, "vnc_sasl");
+ CHECK_TYPE ("vnc_sasl", VIR_CONF_LONG);
+ if (p) driver->vncSASL = p->l;
+
+ p = virConfGetValue (conf, "vnc_sasl_dir");
+ CHECK_TYPE ("vnc_sasl_dir", VIR_CONF_STRING);
+ if (p && p->str) {
+ VIR_FREE(driver->vncSASLdir);
+ if (!(driver->vncSASLdir = strdup(p->str))) {
+ virReportOOMError(NULL);
+ virConfFree(conf);
+ return -1;
+ }
+ }
+
virConfFree (conf);
return 0;
}
@@ -838,15 +853,20 @@ int qemudBuildCommandLine(virConnectPtr
goto no_memory; \
} while (0)
+#define ADD_ENV_PAIR(envname, val) \
+ do { \
+ char *envval; \
+ ADD_ENV_SPACE; \
+ if (virAsprintf(&envval, "%s=%s", envname, val) < 0) \
+ goto no_memory; \
+ qenv[qenvc++] = envval; \
+ } while (0)
+
#define ADD_ENV_COPY(envname) \
do { \
char *val = getenv(envname); \
- char *envval; \
- ADD_ENV_SPACE; \
if (val != NULL) { \
- if (virAsprintf(&envval, "%s=%s", envname, val) < 0) \
- goto no_memory; \
- qenv[qenvc++] = envval; \
+ ADD_ENV_PAIR(envname, val); \
} \
} while (0)
@@ -1295,6 +1315,15 @@ int qemudBuildCommandLine(virConnectPtr
driver->vncTLSx509certdir);
}
}
+
+ if (driver->vncSASL) {
+ virBufferAddLit(&opt, ",sasl");
+
+ if (driver->vncSASLdir)
+ ADD_ENV_PAIR("SASL_CONF_DIR", driver->vncSASLdir);
+
+ /* TODO: Support ACLs later */
+ }
} else {
virBufferVSprintf(&opt, "%d",
vm->def->graphics->data.vnc.port - 5900);
diff -r 961d4b1ca1d3 src/qemu_conf.h
--- a/src/qemu_conf.h Wed Mar 04 13:17:44 2009 +0000
+++ b/src/qemu_conf.h Thu Mar 05 14:22:50 2009 +0000
@@ -73,9 +73,11 @@ struct qemud_driver {
char *stateDir;
unsigned int vncTLS : 1;
unsigned int vncTLSx509verify : 1;
+ unsigned int vncSASL : 1;
char *vncTLSx509certdir;
char *vncListen;
char *vncPassword;
+ char *vncSASLdir;
virCapsPtr caps;
diff -r 961d4b1ca1d3 src/qemu_driver.c
--- a/src/qemu_driver.c Wed Mar 04 13:17:44 2009 +0000
+++ b/src/qemu_driver.c Thu Mar 05 14:22:50 2009 +0000
@@ -620,6 +620,7 @@ qemudShutdown(void) {
VIR_FREE(qemu_driver->vncTLSx509certdir);
VIR_FREE(qemu_driver->vncListen);
VIR_FREE(qemu_driver->vncPassword);
+ VIR_FREE(qemu_driver->vncSASLdir);
/* Free domain callback list */
virDomainEventCallbackListFree(qemu_driver->domainEventCallbacks);
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args Thu Mar 05 14:22:50 2009 +0000
@@ -0,0 +1,1 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test SASL_CONF_DIR=/root/.sasl2 /usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -pidfile /nowhere/QEMUGuest1.pid -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3,sasl
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml Thu Mar 05 14:22:50 2009 +0000
@@ -0,0 +1,24 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219200</memory>
+ <currentMemory>219200</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ </disk>
+ <input type='mouse' bus='ps2'/>
+ <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
+ </devices>
+</domain>
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.args
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.args Thu Mar 05 14:22:50 2009 +0000
@@ -0,0 +1,1 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test SASL_CONF_DIR=/root/.sasl2 /usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -pidfile /nowhere/QEMUGuest1.pid -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3,tls,x509verify=/etc/pki/tls/qemu,sasl
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml Thu Mar 05 14:22:50 2009 +0000
@@ -0,0 +1,24 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219200</memory>
+ <currentMemory>219200</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ </disk>
+ <input type='mouse' bus='ps2'/>
+ <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
+ </devices>
+</domain>
diff -r 961d4b1ca1d3 tests/qemuxml2argvtest.c
--- a/tests/qemuxml2argvtest.c Wed Mar 04 13:17:44 2009 +0000
+++ b/tests/qemuxml2argvtest.c Thu Mar 05 14:22:50 2009 +0000
@@ -213,6 +213,19 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_DRIVE_CACHE_V2);
DO_TEST("disk-usb", 0);
DO_TEST("graphics-vnc", 0);
+
+ driver.vncSASL = 1;
+ driver.vncSASLdir = strdup("/root/.sasl2");
+ DO_TEST("graphics-vnc-sasl", 0);
+ driver.vncTLS = 1;
+ driver.vncTLSx509verify = 1;
+ driver.vncTLSx509certdir = strdup("/etc/pki/tls/qemu");
+ DO_TEST("graphics-vnc-tls", 0);
+ driver.vncSASL = driver.vncTLSx509verify = driver.vncTLS = 0;
+ free(driver.vncSASLdir);
+ free(driver.vncTLSx509certdir);
+ driver.vncSASLdir = driver.vncTLSx509certdir = NULL;
+
DO_TEST("graphics-sdl", 0);
DO_TEST("graphics-sdl-fullscreen", 0);
DO_TEST("input-usbmouse", 0);

View File

@@ -0,0 +1,26 @@
From 0ae4c67ff5f1d24698c5cfc8a9719d333c892644 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc@redhat.com>
Date: Thu, 16 Apr 2009 11:23:55 +0100
Subject: [PATCH 1/3] qemu -drive takes format= not fmt=
Seems like a simple typo - it has been "format=" since the flag
was introduced, but we added it as "fmt=".
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
src/qemu_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index f36c927..6f9e610 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -1135,7 +1135,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
disk->device == VIR_DOMAIN_DISK_DEVICE_DISK)
virBufferAddLit(&opt, ",boot=on");
if (disk->driverType)
- virBufferVSprintf(&opt, ",fmt=%s", disk->driverType);
+ virBufferVSprintf(&opt, ",format=%s", disk->driverType);
if (disk->cachemode) {
const char *mode =

View File

@@ -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;
}

View File

@@ -0,0 +1,33 @@
--- src/qemu_conf.c.orig 2009-04-02 11:50:10.000000000 +0200
+++ src/qemu_conf.c 2009-04-03 17:46:59.000000000 +0200
@@ -779,6 +779,20 @@ int qemudBuildCommandLine(virConnectPtr
char domid[50];
char *pidfile;
const char *cpu = NULL;
+ int skipSound = 0;
+
+ if (driver->securityDriver &&
+ driver->securityDriver->name &&
+ STREQ(driver->securityDriver->name, "selinux") &&
+ getuid() == 0) {
+ static int soundWarned = 0;
+ skipSound = 1;
+ if (vm->def->nsounds &&
+ !soundWarned) {
+ soundWarned = 1;
+ VIR_WARN0("Sound cards for VMs are disabled while SELinux security model is active");
+ }
+ }
uname_normalize(&ut);
@@ -1425,7 +1439,8 @@ int qemudBuildCommandLine(virConnectPtr
}
/* Add sound hardware */
- if (vm->def->nsounds) {
+ if (vm->def->nsounds &&
+ !skipSound) {
int size = 100;
char *modstr;
if (VIR_ALLOC_N(modstr, size+1) < 0)

View File

@@ -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

View File

@@ -13,6 +13,25 @@
%define with_uml 0%{!?_without_uml:1}
%define with_network 0%{!?_without_network:1}
%define with_xen 0%{!?_without_xen:1}
%define with_xen_proxy 0%{!?_without_xen_proxy:1}
%define with_qemu 0%{!?_without_qemu:1}
%define with_openvz 0%{!?_without_openvz:1}
%define with_lxc 0%{!?_without_lxc:1}
%define with_sasl 0%{!?_without_sasl:1}
%define with_avahi 0%{!?_without_avahi:1}
%define with_polkit 0%{!?_without_polkit:0}
%define with_python 0%{!?_without_python:1}
%define with_libvirtd 0%{!?_without_libvirtd:1}
%define with_uml 0%{!?_without_uml:1}
%define with_network 0%{!?_without_network:1}
%define with_storage_fs 0%{!?_without_storage_fs:1}
%define with_storage_lvm 0%{!?_without_storage_lvm:1}
%define with_storage_iscsi 0%{!?_without_storage_iscsi:1}
%define with_storage_disk 0%{!?_without_storage_disk:1}
%define with_numactl 0%{!?_without_numactl:1}
# Xen is available only on i386 x86_64 ia64
%ifnarch i386 i586 i686 x86_64 ia64
%define with_xen 0
@@ -46,15 +65,23 @@
Summary: Library providing a simple API virtualization
Name: libvirt
Version: 0.6.1
Release: 3%{?dist}%{?extra_release}
Version: 0.6.2
Release: 5%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
Source: libvirt-%{version}.tar.gz
Patch1: libvirt-%{version}-storage-delete-fail.patch
# Not upstream yet - pending QEMU merge
Patch100: libvirt-%{version}-vnc-sasl-auth.patch
# Patches cherry-picked from upstream
Patch0: libvirt-0.6.2-qemu-drive-format.patch
# Fix shared/readonly disk labelling
Patch1: libvirt-0.6.2-shared-readonly-label.patch
# Fix <hostdev managed='yes'>
Patch2: libvirt-0.6.3-hostdev-managed.patch
# Not for upstream. Temporary hack till PulseAudio autostart
# problems are sorted out when SELinux enforcing
Patch200: libvirt-0.6.2-svirt-sound.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://libvirt.org/
BuildRequires: python python-devel
@@ -77,11 +104,13 @@ Requires: cyrus-sasl-md5
%if %{with_polkit}
Requires: PolicyKit >= 0.6
%endif
%if %{with_storage_fs}
# For mount/umount in FS driver
BuildRequires: util-linux
# For showmount in FS driver (netfs discovery)
BuildRequires: nfs-utils
Requires: nfs-utils
%endif
%if %{with_qemu}
# From QEMU RPMs
Requires: /usr/bin/qemu-img
@@ -91,12 +120,18 @@ Requires: /usr/bin/qemu-img
Requires: /usr/sbin/qcow-create
%endif
%endif
%if %{with_storage_lvm}
# For LVM drivers
Requires: lvm2
%endif
%if %{with_storage_iscsi}
# For ISCSI driver
Requires: iscsi-initiator-utils
%endif
%if %{with_storage_disk}
# For disk driver
Requires: parted
%endif
# For svirt support
Requires: libselinux
%if %{with_xen}
@@ -124,8 +159,10 @@ BuildRequires: cyrus-sasl-devel
%if %{with_polkit}
BuildRequires: PolicyKit-devel >= 0.6
%endif
%if %{with_storage_fs}
# For mount/umount in FS driver
BuildRequires: util-linux
%endif
%if %{with_qemu}
# From QEMU RPMs
BuildRequires: /usr/bin/qemu-img
@@ -135,14 +172,22 @@ BuildRequires: /usr/bin/qemu-img
BuildRequires: /usr/sbin/qcow-create
%endif
%endif
%if %{with_storage_lvm}
# For LVM drivers
BuildRequires: lvm2
%endif
%if %{with_storage_iscsi}
# For ISCSI driver
BuildRequires: iscsi-initiator-utils
%endif
%if %{with_storage_disk}
# For disk driver
BuildRequires: parted-devel
%endif
%if %{with_numactl}
# For QEMU/LXC numa info
BuildRequires: numactl-devel
%endif
Obsoletes: libvir <= 0.2
Provides: libvir = %{version}-%{release}
@@ -185,9 +230,12 @@ of recent versions of Linux (and other OSes).
%prep
%setup -q
%patch1 -p1
%patch100 -p1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch200 -p0
mv NEWS NEWS.old
iconv -f ISO-8859-1 -t UTF-8 < NEWS.old > NEWS
@@ -241,6 +289,26 @@ iconv -f ISO-8859-1 -t UTF-8 < NEWS.old > NEWS
%define _without_network --without-network
%endif
%if ! %{with_storage_fs}
%define _without_storage_fs --without-storage-fs
%endif
%if ! %{with_storage_lvm}
%define _without_storage_lvm --without-storage-lvm
%endif
%if ! %{with_storage_iscsi}
%define _without_storage_iscsi --without-storage-iscsi
%endif
%if ! %{with_storage_disk}
%define _without_storage_disk --without-storage-disk
%endif
%if ! %{with_numactl}
%define _without_numactl --without-numactl
%endif
%configure %{?_without_xen} \
%{?_without_qemu} \
%{?_without_openvz} \
@@ -253,6 +321,11 @@ iconv -f ISO-8859-1 -t UTF-8 < NEWS.old > NEWS
%{?_without_uml} \
%{?_without_network} \
%{?_with_rhel5_api} \
%{?_without_storage_fs} \
%{?_without_storage_lvm} \
%{?_without_storage_iscsi} \
%{?_without_storage_disk} \
%{?_without_numactl} \
--with-init-script=redhat \
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
--with-remote-file=%{_localstatedir}/run/libvirtd.pid
@@ -276,6 +349,8 @@ install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/run/libvirt/
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt/images/
# Default dir for kernel+initrd images defnied in SELinux policy
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt/boot/
# used for virDomainMemoryPeek
install -d -m 0700 $RPM_BUILD_ROOT%{_localstatedir}/cache/libvirt/
%if %{with_qemu}
# We don't want to install /etc/libvirt/qemu/networks in the main %files list
@@ -394,6 +469,7 @@ fi
%dir %{_localstatedir}/lib/libvirt/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
%if %{with_qemu}
%dir %{_localstatedir}/run/libvirt/qemu/
@@ -456,6 +532,7 @@ fi
%dir %{_includedir}/libvirt
%{_includedir}/libvirt/*.h
%{_libdir}/pkgconfig/libvirt.pc
%dir %{_datadir}/gtk-doc/html/libvirt
%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
%doc %{_datadir}/gtk-doc/html/libvirt/*.html
%doc %{_datadir}/gtk-doc/html/libvirt/*.png
@@ -480,6 +557,43 @@ fi
%endif
%changelog
* Wed May 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-5.fc11
- Fix handling of <hostdev managed='yes'> (bug #499386)
* Tue May 5 2009 Daniel P. Berrange <berrange@redhat.com> - 0.6.2-4.fc11
- Fix labelling of shared/readonly disks (rhbz #493692)
* Tue Apr 28 2009 Daniel Veillard <veillard@redhat.com> - 0.6.2-3.fc11
- Fix missing directories in spec (#496945 and gtk-doc)
* Thu Apr 16 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-2.fc11
- Fix qemu drive format specification (#496092)
* Fri Apr 3 2009 Daniel Veillard <veillard@redhat.com> - 0.6.2-1.fc11
- release of 0.6.2
- memory ballooning in QEMU
- SCSI HBA storage pool support
- support SASL auth for VNC server
- PCI passthrough in Xen driver
- assorted bug fixes
* Fri Apr 3 2009 Daniel P. Berrange <berrange@redhat.com> - 0.6.1-6.fc11
- Fix typo in previous patch
* Tue Mar 17 2009 Daniel P. Berrange <berrange@redhat.com> - 0.6.1-5.fc11
- Don't relabel shared/readonly disks
- Disable sound cards when running sVirt
* Tue Mar 17 2009 Daniel P. Berrange <berrange@redhat.com> - 0.6.1-4.fc11
- Fix memory allocation for xend lookup
- Avoid crash if storage volume deletion fails
- Fix multiple FD leaks
- Fix bug in dispatch FD events when a callback is marked deleted
- Fix parsing of storage volume owner/group/mode
- Fix memory allocation for virDomainGetVcpus RPC handler
- Avoid deadlock in setting vCPU count
- Use correct driver name in Xen block detach
* Mon Mar 9 2009 Cole Robinson <crobinso@redhat.com> - 0.6.1-3.fc11
- Add Requires: libselinux

View File

@@ -1 +1 @@
3154ea9d4a0778497dfdf58cb98127c0 libvirt-0.6.1.tar.gz
3035b484861516a1cd425acef1e760e3 libvirt-0.6.2.tar.gz