Compare commits
200 Commits
libvirt-0_
...
libvirt-0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
427ed20801 | ||
|
|
d23e6c285b | ||
|
|
2c139b45d8 | ||
|
|
762435e3b7 | ||
|
|
6383d6b056 | ||
|
|
3712441ea6 | ||
|
|
9d0bc882fa | ||
|
|
90dddf3d3d | ||
|
|
86abd54d02 | ||
|
|
4ab5ad5425 | ||
|
|
f9c1b758c3 | ||
|
|
38cf1bd5ba | ||
|
|
aeda455930 | ||
|
|
288291b795 | ||
|
|
7c2073faca | ||
|
|
5b528ba717 | ||
|
|
4f731a7250 | ||
|
|
f1ac0031f5 | ||
|
|
e45b9c9030 | ||
|
|
3cf75c269d | ||
|
|
585033f372 | ||
|
|
897506e66a | ||
|
|
e4bf8ffa42 | ||
|
|
20367a58a6 | ||
|
|
aa037364ed | ||
|
|
c034c1a3b2 | ||
|
|
da05e02884 | ||
|
|
e1b7b518ac | ||
|
|
581b5f5022 | ||
|
|
c476c8b683 | ||
|
|
b93eafc59f | ||
|
|
2105d62ca8 | ||
|
|
743adffffe | ||
|
|
11e3b51c0d | ||
|
|
66df925739 | ||
|
|
b20a5c6d3b | ||
|
|
7f58f3aa54 | ||
|
|
6577b14441 | ||
|
|
2e7812764f | ||
|
|
854b878580 | ||
|
|
89c28e4013 | ||
|
|
db269c2d21 | ||
|
|
98e4f7ee9f | ||
|
|
0c4afc5ee9 | ||
|
|
593255292e | ||
|
|
ccafc8ecb4 | ||
|
|
a38fb9cbc1 | ||
|
|
6359121866 | ||
|
|
b20d669e88 | ||
|
|
a3e1cc37ed | ||
|
|
a6eca3382d | ||
|
|
c6c5072e90 | ||
|
|
705fd20a0e | ||
|
|
e0e9927d93 | ||
|
|
bae7a0fb84 | ||
|
|
36aee593bc | ||
|
|
dc0cb0e91a | ||
|
|
84d66312fe | ||
|
|
4f644ce267 | ||
|
|
cdd5b3d62d | ||
|
|
53f63aa62d | ||
|
|
748df35c5f | ||
|
|
a6e23d00fa | ||
|
|
c6d11b43c9 | ||
|
|
83091ff0dd | ||
|
|
4465a63872 | ||
|
|
3f397d9786 | ||
|
|
750aec5507 | ||
|
|
d7c1d3bbc0 | ||
|
|
fa0f21c263 | ||
|
|
afdaf5d354 | ||
|
|
26bba5aea9 | ||
|
|
1a4185bdcc | ||
|
|
6a73119e65 | ||
|
|
1e2f9fce0a | ||
|
|
f5edf79c95 | ||
|
|
b59e64bf44 | ||
|
|
a09fc2658a | ||
|
|
a008fcf27e | ||
|
|
511f6cd625 | ||
|
|
48b90fefc1 | ||
|
|
bc4bbabdf6 | ||
|
|
905627c8fd | ||
|
|
a16d752c10 | ||
|
|
29b1292019 | ||
|
|
f3546be64b | ||
|
|
fb9044931e | ||
|
|
03c5fec4d2 | ||
|
|
ce373a25b6 | ||
|
|
996d0e4709 | ||
|
|
8c01426c44 | ||
|
|
e859f7e59e | ||
|
|
25ea2f59bd | ||
|
|
c80b7f0d5a | ||
|
|
958f1c3dff | ||
|
|
4a8ca1017f | ||
|
|
1e122ee5dc | ||
|
|
6a6307bcdc | ||
|
|
6e8332946a | ||
|
|
982683e56f | ||
|
|
7244d1a339 | ||
|
|
2a3935580c | ||
|
|
28f7f11450 | ||
|
|
ca07bc4597 | ||
|
|
8e23194a2b | ||
|
|
fe09090e2d | ||
|
|
b5868cf8cf | ||
|
|
f294b40ba5 | ||
|
|
c0c1a7bb79 | ||
|
|
1b864048bd | ||
|
|
072c9c45ab | ||
|
|
af111679c3 | ||
|
|
dd9f21eaa2 | ||
|
|
f0e356df98 | ||
|
|
140bcf9ffc | ||
|
|
af69660412 | ||
|
|
6dc94c6252 | ||
|
|
eb34165670 | ||
|
|
7ce08f2148 | ||
|
|
049a8c79d9 | ||
|
|
f7a6d90012 | ||
|
|
67a2f29a89 | ||
|
|
82422fa1ff | ||
|
|
a73cf1d010 | ||
|
|
481419ebb6 | ||
|
|
1e65165c3a | ||
|
|
bca27d9111 | ||
|
|
08b9144b41 | ||
|
|
2063007248 | ||
|
|
81e46cb6da | ||
|
|
263e2f2021 | ||
|
|
2b9efc3de2 | ||
|
|
69f6239766 | ||
|
|
bf744f9872 | ||
|
|
45b0b2bfa6 | ||
|
|
f29ea218b7 | ||
|
|
7d193b7810 | ||
|
|
3182a4df5a | ||
|
|
4f667910e9 | ||
|
|
b395a39f7b | ||
|
|
fdd7e87fe3 | ||
|
|
f06c387ab5 | ||
|
|
5ad8bc8190 | ||
|
|
31802de821 | ||
|
|
cc39758e17 | ||
|
|
55fabd69c0 | ||
|
|
b2a1a0e9ba | ||
|
|
cbe377ed29 | ||
|
|
06a21e388f | ||
|
|
d1a886ab31 | ||
|
|
c70baa5133 | ||
|
|
52b4d91272 | ||
|
|
338630edc8 | ||
|
|
a05e64b718 | ||
|
|
c003690dfc | ||
|
|
2cac8ea133 | ||
|
|
deefad73a9 | ||
|
|
f6cef943a9 | ||
|
|
7a6f0752c1 | ||
|
|
36d558635e | ||
|
|
98bceee6b1 | ||
|
|
4e70e5049f | ||
|
|
e66ceb7f97 | ||
|
|
23d5b99123 | ||
|
|
df8a62cdc8 | ||
|
|
8e36286f00 | ||
|
|
cd0f44cfff | ||
|
|
dcd808aefc | ||
|
|
8713d4b7ef | ||
|
|
68efefa919 | ||
|
|
1c5afbb774 | ||
|
|
e61694fd1d | ||
|
|
608f915ea7 | ||
|
|
b28edd6eab | ||
|
|
327fe785ba | ||
|
|
5c1d884231 | ||
|
|
54c7c9997c | ||
|
|
dec47cc4eb | ||
|
|
ecaf0eb615 | ||
|
|
ea6b32b5e4 | ||
|
|
313e00f3ac | ||
|
|
b3a53e18a9 | ||
|
|
24467d1235 | ||
|
|
fdaa69f5e3 | ||
|
|
cf2cd869d9 | ||
|
|
f2572ab2b4 | ||
|
|
90a17a6e65 | ||
|
|
9f2e4f2b21 | ||
|
|
bc485ef21f | ||
|
|
0d3a7da407 | ||
|
|
f68d725fc4 | ||
|
|
044e9b5c7b | ||
|
|
96a9b8bc2e | ||
|
|
66a051f485 | ||
|
|
609ab7cda8 | ||
|
|
0caeb23111 | ||
|
|
7599107322 | ||
|
|
861e11f3e4 | ||
|
|
2ea97c32dc | ||
|
|
cb54686f58 |
20
.cvsignore
20
.cvsignore
@@ -1,6 +1,14 @@
|
||||
libvirt-0.0.3.tar.gz
|
||||
libvirt-0.0.4.tar.gz
|
||||
libvirt-0.0.5.tar.gz
|
||||
libvirt-0.0.6.tar.gz
|
||||
libvirt-0.1.0.tar.gz
|
||||
libvirt-0.1.1.tar.gz
|
||||
.build*.log
|
||||
*.rpm
|
||||
i686
|
||||
x86_64
|
||||
libvirt-*.tar.gz
|
||||
libvirt-0.6.0.tar.gz
|
||||
libvirt-0.6.1.tar.gz
|
||||
libvirt-0.6.2.tar.gz
|
||||
libvirt-0.6.3.tar.gz
|
||||
libvirt-0.6.4.tar.gz
|
||||
libvirt-0.6.5.tar.gz
|
||||
libvirt-0.7.0.tar.gz
|
||||
libvirt-0.7.1.tar.gz
|
||||
libvirt-0.7.2.tar.gz
|
||||
|
||||
17
Makefile
17
Makefile
@@ -3,4 +3,19 @@
|
||||
NAME := libvirt
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
include ../common/Makefile.common
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attempt a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
|
||||
31
libvirt-logrotate-avoid-compressing-small-logs.patch
Normal file
31
libvirt-logrotate-avoid-compressing-small-logs.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From d7cca87f6c5ad2316934af8ecb95829b95b662c6 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Kenigsberg <danken@redhat.com>
|
||||
Date: Wed, 21 Oct 2009 13:56:04 +0200
|
||||
Subject: [PATCH] Do not log rotate very small logs
|
||||
|
||||
Without this, after few weeks without use, each defined domain grows a
|
||||
tail of empty gzipped logs, instead of keeping just the last log of
|
||||
interest.
|
||||
|
||||
* daemon/libvirtd.logrotate.in: only rotate when the log is over 100 KBytes
|
||||
|
||||
(cherry picked from commit b03fe2d0aefb57a096a102bf23375f0a167ca189)
|
||||
|
||||
Fedora-patch: libvirt-logrotate-avoid-compressing-small-logs.patch
|
||||
---
|
||||
daemon/libvirtd.logrotate.in | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/daemon/libvirtd.logrotate.in b/daemon/libvirtd.logrotate.in
|
||||
index 093651c..0c51fd3 100644
|
||||
--- a/daemon/libvirtd.logrotate.in
|
||||
+++ b/daemon/libvirtd.logrotate.in
|
||||
@@ -5,4 +5,5 @@
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
+ minsize 100k
|
||||
}
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
42
libvirt-qemu-machine-type-fixes2.patch
Normal file
42
libvirt-qemu-machine-type-fixes2.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From b7b6a28eb9eae641762de9408a90971d849ce92e Mon Sep 17 00:00:00 2001
|
||||
From: Mark McLoughlin <markmc@redhat.com>
|
||||
Date: Thu, 15 Oct 2009 12:09:17 +0100
|
||||
Subject: [PATCH] Don't copy old machines from a domain which has none
|
||||
|
||||
If the the qemu and kvm binaries are the same, we don't include machine
|
||||
types in the kvm domain info.
|
||||
|
||||
However, the code which refreshes the machine types info from the
|
||||
previous capabilities structure first looks at the kvm domain's info,
|
||||
finds it matches and then copies the empty machine types list over
|
||||
for the top-level qemu domain.
|
||||
|
||||
That doesn't make sense, we shouldn't copy an empty machin types list.
|
||||
|
||||
* src/qemu/qemu_conf.c: qemudGetOldMachinesFromInfo(): don't copy an
|
||||
empty machine types list.
|
||||
|
||||
(cherry picked from commit 2210f8a3a8e2774ca4fb8b42e21899e5b85ca913)
|
||||
|
||||
Fedora-patch: libvirt-qemu-machine-type-fixes2.patch
|
||||
---
|
||||
src/qemu/qemu_conf.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
||||
index ac63570..b881f1e 100644
|
||||
--- a/src/qemu/qemu_conf.c
|
||||
+++ b/src/qemu/qemu_conf.c
|
||||
@@ -505,6 +505,9 @@ qemudGetOldMachinesFromInfo(virCapsGuestDomainInfoPtr info,
|
||||
virCapsGuestMachinePtr *list;
|
||||
int i;
|
||||
|
||||
+ if (!info->nmachines)
|
||||
+ return 0;
|
||||
+
|
||||
if (!info->emulator || !STREQ(emulator, info->emulator))
|
||||
return 0;
|
||||
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
168
libvirt-qemu-save-restore.patch
Normal file
168
libvirt-qemu-save-restore.patch
Normal file
@@ -0,0 +1,168 @@
|
||||
From 076fffe1514b72ffc9a041f7f68348f5487ee8ba Mon Sep 17 00:00:00 2001
|
||||
From: Daniel P. Berrange <berrange@redhat.com>
|
||||
Date: Wed, 11 Nov 2009 12:07:00 +0000
|
||||
Subject: [PATCH] Fix save and restore with non-privileged guests and SELinux
|
||||
|
||||
When running qemu:///system instance, libvirtd runs as root,
|
||||
but QEMU may optionally be configured to run non-root. When
|
||||
then saving a guest to a state file, the file is initially
|
||||
created as root, and thus QEMU cannot write to it. It is also
|
||||
missing labelling required to allow access via SELinux.
|
||||
|
||||
* src/qemu/qemu_driver.c: Set ownership on save image before
|
||||
running migrate command in virDomainSave impl. Call out to
|
||||
security driver to set save image labelling
|
||||
* src/security/security_driver.h: Add driver APIs for setting
|
||||
and restoring saved state file labelling
|
||||
* src/security/security_selinux.c: Implement saved state file
|
||||
labelling for SELinux
|
||||
|
||||
(cherry picked from commit bc0010b3d149df00406b82c37eb59874d8525af4)
|
||||
|
||||
Fedora-patch: libvirt-qemu-save-restore.patch
|
||||
---
|
||||
src/qemu/qemu_driver.c | 35 ++++++++++++++++++++++++++++++++---
|
||||
src/security/security_driver.h | 7 +++++++
|
||||
src/security/security_selinux.c | 23 +++++++++++++++++++++++
|
||||
3 files changed, 62 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index c544c4b..171ac8f 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -3146,6 +3146,7 @@ static int qemudDomainSave(virDomainPtr dom,
|
||||
char *xml = NULL;
|
||||
struct qemud_save_header header;
|
||||
int ret = -1;
|
||||
+ int rc;
|
||||
virDomainEventPtr event = NULL;
|
||||
|
||||
memset(&header, 0, sizeof(header));
|
||||
@@ -3226,9 +3227,22 @@ static int qemudDomainSave(virDomainPtr dom,
|
||||
}
|
||||
fd = -1;
|
||||
|
||||
+ if (driver->privileged &&
|
||||
+ chown(path, driver->user, driver->group) < 0) {
|
||||
+ virReportSystemError(NULL, errno,
|
||||
+ _("unable to set ownership of '%s' to user %d:%d"),
|
||||
+ path, driver->user, driver->group);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (driver->securityDriver &&
|
||||
+ driver->securityDriver->domainSetSavedStateLabel &&
|
||||
+ driver->securityDriver->domainSetSavedStateLabel(dom->conn, vm, path) == -1)
|
||||
+ goto cleanup;
|
||||
+
|
||||
if (header.compressed == QEMUD_SAVE_FORMAT_RAW) {
|
||||
const char *args[] = { "cat", NULL };
|
||||
- ret = qemuMonitorMigrateToCommand(vm, 0, args, path);
|
||||
+ rc = qemuMonitorMigrateToCommand(vm, 0, args, path);
|
||||
} else {
|
||||
const char *prog = qemudSaveCompressionTypeToString(header.compressed);
|
||||
const char *args[] = {
|
||||
@@ -3236,12 +3250,27 @@ static int qemudDomainSave(virDomainPtr dom,
|
||||
"-c",
|
||||
NULL
|
||||
};
|
||||
- ret = qemuMonitorMigrateToCommand(vm, 0, args, path);
|
||||
+ rc = qemuMonitorMigrateToCommand(vm, 0, args, path);
|
||||
}
|
||||
|
||||
- if (ret < 0)
|
||||
+ if (rc < 0)
|
||||
goto cleanup;
|
||||
|
||||
+ if (driver->privileged &&
|
||||
+ chown(path, 0, 0) < 0) {
|
||||
+ virReportSystemError(NULL, errno,
|
||||
+ _("unable to set ownership of '%s' to user %d:%d"),
|
||||
+ path, 0, 0);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (driver->securityDriver &&
|
||||
+ driver->securityDriver->domainRestoreSavedStateLabel &&
|
||||
+ driver->securityDriver->domainRestoreSavedStateLabel(dom->conn, path) == -1)
|
||||
+ goto cleanup;
|
||||
+
|
||||
+ ret = 0;
|
||||
+
|
||||
/* Shut it down */
|
||||
qemudShutdownVMDaemon(dom->conn, driver, vm);
|
||||
event = virDomainEventNewFromObj(vm,
|
||||
diff --git a/src/security/security_driver.h b/src/security/security_driver.h
|
||||
index fde2978..5514962 100644
|
||||
--- a/src/security/security_driver.h
|
||||
+++ b/src/security/security_driver.h
|
||||
@@ -42,6 +42,11 @@ typedef int (*virSecurityDomainRestoreHostdevLabel) (virConnectPtr conn,
|
||||
typedef int (*virSecurityDomainSetHostdevLabel) (virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr dev);
|
||||
+typedef int (*virSecurityDomainSetSavedStateLabel) (virConnectPtr conn,
|
||||
+ virDomainObjPtr vm,
|
||||
+ const char *savefile);
|
||||
+typedef int (*virSecurityDomainRestoreSavedStateLabel) (virConnectPtr conn,
|
||||
+ const char *savefile);
|
||||
typedef int (*virSecurityDomainGenLabel) (virConnectPtr conn,
|
||||
virDomainObjPtr sec);
|
||||
typedef int (*virSecurityDomainReserveLabel) (virConnectPtr conn,
|
||||
@@ -71,6 +76,8 @@ struct _virSecurityDriver {
|
||||
virSecurityDomainRestoreLabel domainRestoreSecurityLabel;
|
||||
virSecurityDomainRestoreHostdevLabel domainRestoreSecurityHostdevLabel;
|
||||
virSecurityDomainSetHostdevLabel domainSetSecurityHostdevLabel;
|
||||
+ virSecurityDomainSetSavedStateLabel domainSetSavedStateLabel;
|
||||
+ virSecurityDomainRestoreSavedStateLabel domainRestoreSavedStateLabel;
|
||||
|
||||
/*
|
||||
* This is internally managed driver state and should only be accessed
|
||||
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
|
||||
index 7e0f71a..4f2d1d3 100644
|
||||
--- a/src/security/security_selinux.c
|
||||
+++ b/src/security/security_selinux.c
|
||||
@@ -525,6 +525,7 @@ done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+
|
||||
static int
|
||||
SELinuxRestoreSecurityPCILabel(virConnectPtr conn,
|
||||
pciDevice *dev ATTRIBUTE_UNUSED,
|
||||
@@ -625,6 +626,26 @@ SELinuxRestoreSecurityLabel(virConnectPtr conn,
|
||||
return rc;
|
||||
}
|
||||
|
||||
+
|
||||
+static int
|
||||
+SELinuxSetSavedStateLabel(virConnectPtr conn,
|
||||
+ virDomainObjPtr vm,
|
||||
+ const char *savefile)
|
||||
+{
|
||||
+ const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
|
||||
+
|
||||
+ return SELinuxSetFilecon(conn, savefile, secdef->imagelabel);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+SELinuxRestoreSavedStateLabel(virConnectPtr conn,
|
||||
+ const char *savefile)
|
||||
+{
|
||||
+ return SELinuxRestoreSecurityFileLabel(conn, savefile);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int
|
||||
SELinuxSecurityVerify(virConnectPtr conn, virDomainDefPtr def)
|
||||
{
|
||||
@@ -694,4 +715,6 @@ virSecurityDriver virSELinuxSecurityDriver = {
|
||||
.domainSetSecurityLabel = SELinuxSetSecurityLabel,
|
||||
.domainSetSecurityHostdevLabel = SELinuxSetSecurityHostdevLabel,
|
||||
.domainRestoreSecurityHostdevLabel = SELinuxRestoreSecurityHostdevLabel,
|
||||
+ .domainSetSavedStateLabel = SELinuxSetSavedStateLabel,
|
||||
+ .domainRestoreSavedStateLabel = SELinuxRestoreSavedStateLabel,
|
||||
};
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
1100
libvirt.spec
1100
libvirt.spec
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user