Compare commits

...

155 Commits

Author SHA1 Message Date
Daniel P. Berrange
50fce74b00 Really fix restore file labelling this time 2009-11-19 12:51:32 +00:00
Daniel P. Berrange
e29f71d1c9 Disable numactl on s390[x] 2009-11-11 18:11:49 +00:00
Daniel P. Berrange
427ed20801 Fix QEMU save/restore permissions / labelling 2009-11-11 15:33:52 +00:00
Mark McLoughlin
d23e6c285b * Thu Oct 29 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.2-3
- Avoid compressing small log files (#531030)
2009-10-29 17:26:05 +00:00
Mark McLoughlin
2c139b45d8 * Thu Oct 29 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.2-2
- Fix qemu machine types handling
2009-10-29 10:57:55 +00:00
Mark McLoughlin
762435e3b7 * Thu Oct 29 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.2-2
- Make libvirt-devel require libvirt-client, not libvirt
2009-10-29 10:15:23 +00:00
Daniel Veillard
6383d6b056 0.7.2 release, Daniel 2009-10-14 13:03:30 +00:00
Mark McLoughlin
3712441ea6 Add the second patch for #523158 2009-10-13 15:43:47 +00:00
Mark McLoughlin
9d0bc882fa * Tue Oct 13 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-12
- Fix restore of qemu guest using raw save format (#523158)
2009-10-13 15:34:15 +00:00
Mark McLoughlin
90dddf3d3d * Fri Oct 9 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-11
- Fix libvirtd memory leak during error reply sending (#528162)
- Add several PCI hot-unplug typo fixes from upstream
2009-10-09 14:53:48 +00:00
Mark McLoughlin
86abd54d02 * Tue Oct 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-10
- Create /var/log/libvirt/{lxc,uml} dirs for logrotate
- Make libvirt-python dependon on libvirt-client
- Sync misc minor changes from upstream spec
2009-10-06 12:48:58 +00:00
Mark McLoughlin
4ab5ad5425 * Tue Oct 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-9
- Change logrotate config to weekly (#526769)
2009-10-06 09:45:04 +00:00
Mark McLoughlin
f9c1b758c3 - Re-label qcow2 backing files (#497131) 2009-10-01 15:17:31 +00:00
Mark McLoughlin
38cf1bd5ba * Thu Oct 1 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-8
- Disable sound backend, even when selinux is disabled (#524499)
2009-10-01 08:35:16 +00:00
Mark McLoughlin
aeda455930 * Wed Sep 30 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-7
- Fix USB device passthrough (#522683)
2009-09-30 17:58:52 +00:00
Chris Weyl
288291b795 * Mon Sep 21 2009 Chris Weyl <cweyl@alumni.drew.edu> - 0.7.1-6
- rebuild for libssh2 1.2
2009-09-22 03:52:07 +00:00
Mark McLoughlin
7c2073faca * Mon Sep 21 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-5
- Don't set a bogus error in virDrvSupportsFeature()
- Fix raw save format
2009-09-21 15:32:34 +00:00
Mark McLoughlin
5b528ba717 Fix typo 2009-09-17 14:58:55 +00:00
Mark McLoughlin
4f731a7250 Got the wrong bug number 2009-09-17 14:51:05 +00:00
Mark McLoughlin
f1ac0031f5 * Thu Sep 17 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-4%
- A couple of hot-unplug memory handling fixes (#523960)
2009-09-17 14:47:51 +00:00
Daniel Veillard
e45b9c9030 Disable numactl on s390[x], Daniel 2009-09-17 13:30:50 +00:00
Daniel Veillard
3cf75c269d Refactoring of spec file by danpb for RHEL 5/6 compat, daniel 2009-09-17 12:32:32 +00:00
Daniel Veillard
585033f372 Release of 0.7.1 upstream, Daniel 2009-09-15 12:50:58 +00:00
Mark McLoughlin
897506e66a * Mon Sep 14 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-0.2.gitfac3f4c
- Update to newer snapshot of 0.7.1
- Stop libvirt using untrusted 'info vcpus' PID data (#520864)
- Support relabelling of USB and PCI devices
- Enable multipath storage support
- Restart libvirtd upon RPM upgrade
2009-09-14 18:30:45 +00:00
Mark McLoughlin
e4bf8ffa42 * Sun Sep 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-0.1.gitg3ef2e05
- Update to pre-release git snapshot of 0.7.1
- Drop upstreamed patches
2009-09-06 13:46:19 +00:00
Mark McLoughlin
20367a58a6 Add URL to source tag 2009-08-21 10:19:53 +00:00
Mark McLoughlin
aa037364ed * Wed Aug 19 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-6
- Fix migration completion with newer versions of qemu (#516187)
2009-08-19 17:13:01 +00:00
Mark McLoughlin
c034c1a3b2 * Wed Aug 19 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-5
- Add PCI host device hotplug support
- Allow PCI bus reset to reset other devices (#499678)
- Fix stupid PCI reset error message (bug #499678)
- Allow PM reset on multi-function PCI devices (bug #515689)
- Re-attach PCI host devices after guest shuts down (bug #499561)
- Fix list corruption after disk hot-unplug
- Fix minor 'virsh nodedev-list --tree' annoyance
2009-08-19 16:26:27 +00:00
Mark McLoughlin
da05e02884 Sync patches from git 2009-08-17 08:08:46 +00:00
Daniel P. Berrange
e1b7b518ac Added utterly crazy build dep on CVS for stupid autopoint tool 2009-08-13 15:43:14 +00:00
Daniel P. Berrange
581b5f5022 Log and ignore NUMA topology problems (rhbz #506590) 2009-08-13 15:30:19 +00:00
Daniel P. Berrange
c476c8b683 Rewrite policykit support (rhbz #499970) 2009-08-13 15:27:42 +00:00
Mark McLoughlin
b93eafc59f Add bz number 516497 for reference 2009-08-10 10:32:28 +00:00
Mark McLoughlin
2105d62ca8 * Mon Aug 10 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-3
- Don't fail to start network if ipv6 modules is not loaded
2009-08-10 10:24:12 +00:00
Mark McLoughlin
743adffffe * Thu Aug 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-2
- Make sure qemu can access kernel/initrd (bug #516034)
- Set perms on /var/lib/libvirt/boot to 0711 (bug #516034)
2009-08-06 15:01:49 +00:00
Daniel Veillard
11e3b51c0d - Upstream release of 0.7.0
- ESX, VBox3, Power Hypervisor drivers
- new net filesystem glusterfs
- Storage cloning for LVM and Disk backends
- interface implementation based on netcf
- Support cgroups in QEMU driver
- QEmu hotplug NIC support
- a lot of fixes
Daniel
2009-08-05 15:24:45 +00:00
Mark McLoughlin
66df925739 * Fri Jul 31 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-0.9.gite195b43
- Set perms on /var/lib/libvirt/images to 0711
2009-07-31 08:55:24 +00:00
Mark McLoughlin
b20a5c6d3b * Thu Jul 30 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-0.8.gite195b43
- Add patch from upstream to fix qemu pidfile perms problem
2009-07-30 17:02:50 +00:00
Daniel P. Berrange
7f58f3aa54 Create qemu/kvm user & group to fix upgrades 2009-07-30 11:07:16 +00:00
Daniel Veillard
6577b14441 - another prerelease with qemu, uml and remote patches
- drop the news patch as it's now UTF8 upstream
Daniel
2009-07-29 14:58:18 +00:00
Mark McLoughlin
2e7812764f - Fix disabling polkit and netcf on older fedoras 2009-07-29 09:08:57 +00:00
Mark McLoughlin
854b878580 * Wed Jul 29 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-0.5.gitf055724
- Move ldconfig call to libvirt-client %post/%postun
- Fix rpmlint warning about libvirt-client summary
2009-07-29 09:00:02 +00:00
Mark McLoughlin
89c28e4013 * Wed Jul 29 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-0.4.gitf055724
- Drop explicit libselinux requires, it is autorequired
- Drop cleanup of python/tests, apparently not needed
- Cherry-pick upstream patch to convert NEWS to UTF-8, drop iconv
- Drop python BR; python-devel requires it
2009-07-29 08:09:45 +00:00
Mark McLoughlin
db269c2d21 Fix some more trivial differences between upstream spec 2009-07-28 18:13:09 +00:00
Mark McLoughlin
98e4f7ee9f - Set perms on /var/{run,lib,cache}/libvirt/qemu 2009-07-28 18:06:43 +00:00
Mark McLoughlin
0c4afc5ee9 - Remove explicit dir creating in makeinstall, replaced by attr in files 2009-07-28 18:02:50 +00:00
Mark McLoughlin
593255292e - Pass --with-qemu-user=qemu etc. to configure 2009-07-28 17:41:33 +00:00
Mark McLoughlin
ccafc8ecb4 - Remove explicit libxml2 requires, again
- Build with --without-capng if capng support is disabled
2009-07-28 17:40:29 +00:00
Mark McLoughlin
a38fb9cbc1 - Move various requires to the libvirt-client sub-package
- Sync some trivial cleanups from upstream spec file
2009-07-28 17:17:13 +00:00
Mark McLoughlin
6359121866 * Tue Jul 28 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-0.3.gitf055724
- Enable netcf support
2009-07-28 17:04:23 +00:00
Mark McLoughlin
b20d669e88 * Tue Jul 28 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.0-0.2.gitf055724
- Drop glusterfs dep to 2.0.1 (bug #514191)
2009-07-28 09:58:42 +00:00
Daniel Veillard
a3e1cc37ed Push a prerelease of 0.7.0 for F12 'deadline', Daniel 2009-07-27 17:52:28 +00:00
Jesse Keating
a6eca3382d - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-25 08:51:35 +00:00
Richard W.M. Jones
c6c5072e90 Bump release number to rebuild against new libparted. 2009-07-10 22:08:43 +00:00
Daniel Veillard
705fd20a0e Fix libcap-ng-devel require, Daniel 2009-07-03 15:22:52 +00:00
Daniel Veillard
e0e9927d93 Remove the qemu BuildRequires I re-added, Daniel 2009-07-03 15:11:43 +00:00
Daniel Veillard
bae7a0fb84 Upstream release of libvirt-0.6.5, Daniel 2009-07-03 15:07:12 +00:00
Mark McLoughlin
36aee593bc * Fri Jul 3 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.4-4.fc12
- Fix libvirtd crash with bad capabilities data (bug #505635)
2009-07-03 10:08:42 +00:00
Mark McLoughlin
dc0cb0e91a * Fri Jul 3 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.4-3.fc12
- Handle shared/readonly image labelling (bug #493692)
- Don't unnecessarily try to change a file context (bug #507555)
- Don't try to label a disk with no path (e.g. empty cdrom) (bug #499569)
2009-07-03 09:57:08 +00:00
Mark McLoughlin
84d66312fe * Fri Jun 5 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.4-2.fc12
- Remove the qemu BuildRequires
2009-06-05 11:46:47 +00:00
Daniel Veillard
4f644ce267 Old patch didn't apply in kodji ??? Daniel 2009-05-29 17:28:28 +00:00
Daniel Veillard
cdd5b3d62d Keep that patch, daniel 2009-05-29 17:05:50 +00:00
Daniel Veillard
53f63aa62d Upstream release 0.6.4 2009-05-29 16:57:14 +00:00
Mark McLoughlin
748df35c5f * Mon May 25 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.3-11.fc12
- Bring up the bridge, even if it doesn't have an IP address (bug #501912)
2009-05-25 15:22:34 +00:00
Mark McLoughlin
a6e23d00fa * Thu May 21 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.3-10.fc12
- Fix XML attribute escaping (bug #499791)
- Fix serious event handling issues causing guests to be destroyed (bug #499698)
2009-05-21 12:07:09 +00:00
Mark McLoughlin
c6d11b43c9 * Thu May 21 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.3-9.fc12
- Fix qemu argv detection with latest qemu (bug #501923)
2009-05-21 10:42:33 +00:00
Mark McLoughlin
83091ff0dd Add bz numbers for each patch 2009-05-21 10:35:02 +00:00
Cole Robinson
4465a63872 Don't try to label a disk with no path (e.g. empty cdrom) (bug #499569) 2009-05-11 02:29:05 +00:00
Mark McLoughlin
3f397d9786 * Thu May 7 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.3-7.fc12
- Enable migration for qemu 0.10 (bug #499704)
2009-05-07 19:09:00 +00:00
Cole Robinson
750aec5507 Refresh qemu caps when getCapabilities is called (bug #460649) 2009-05-06 16:33:16 +00:00
Mark McLoughlin
d7c1d3bbc0 Revert accidentally committed change 2009-05-06 15:52:08 +00:00
Mark McLoughlin
fa0f21c263 * Wed May 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.3-5.fc12
- Fix handling of <hostdev managed='yes'> (bug #499386)
2009-05-06 15:45:57 +00:00
Daniel P. Berrange
afdaf5d354 Fix readonly/shared disk image labelling (rhbz #493692) 2009-05-05 13:38:26 +00:00
Daniel Veillard
26bba5aea9 was also missing /usr/share/gtk-doc/html/libvirt in -devel
Daniel
2009-04-28 10:53:22 +00:00
Daniel Veillard
1a4185bdcc - fix packaging bug #496945 libvirt should own /var/cache/libvirt
Daniel
2009-04-28 09:18:35 +00:00
Daniel Veillard
6a73119e65 Upstream release, 0.6.3, Daniel 2009-04-24 14:57:21 +00:00
Mark McLoughlin
1e2f9fce0a * Thu Apr 16 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-2.fc12
- Fix qemu drive format specification (#496092)
2009-04-16 15:25:28 +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
Cole Robinson
48b90fefc1 Add Requires: libselinux 2009-03-10 02:28:38 +00:00
Daniel P. Berrange
bc4bbabdf6 Actually add the patch this time 2009-03-06 13:40:58 +00:00
Daniel P. Berrange
905627c8fd Fix crash after storage vol deletion fails. Add SASL auth support in QEMU 2009-03-06 13:31:38 +00:00
Daniel Veillard
a16d752c10 Just removing the old 0.6.0 set of patches, Daniel 2009-03-05 12:55:05 +00:00
Daniel Veillard
29b1292019 Not related to lzo-devel, Daniel 2009-03-05 10:10:19 +00:00
Daniel Veillard
f3546be64b Maybe missing lzo-devel to link with gnulib-tls, Daniel 2009-03-04 21:49:06 +00:00
Daniel Veillard
fb9044931e Upstream release 0.6.1, Daniel 2009-03-04 13:33:45 +00:00
Daniel Veillard
03c5fec4d2 Handle the i386->i586 arch change, Daniel 2009-03-02 06:07:33 +00:00
Jesse Keating
ce373a25b6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 19:46:28 +00:00
Daniel P. Berrange
996d0e4709 Fix QEMU startup timeout/race (rhbz #484649)
Setup DBus threading. Don't allow dbus to call _exit / change SIGPIPE (rhbz #484553)
Fix timeout when autostarting session daemon
2009-02-18 13:51:22 +00:00
Richard W.M. Jones
8c01426c44 Multiple fixes to remove rpmlint warnings/errors (rhbz #226055) 2009-02-12 12:35:17 +00:00
Mark McLoughlin
e859f7e59e Kill some old tarballs
(Just a test commit to see if it gets through mailman)
2009-02-09 08:55:58 +00:00
Daniel P. Berrange
25ea2f59bd Fix patches to be -p1 not -p0 2009-02-06 19:36:12 +00:00
Daniel P. Berrange
c80b7f0d5a Fix libvirtd --timeout usage
Fix RPC call problems and QEMU startup handling (rhbz #484414)
Fix unowned directories (rhbz #483442)
2009-02-06 19:28:20 +00:00
Daniel Veillard
958f1c3dff Release of 0.6.0, Daniel 2009-01-31 09:48:47 +00:00
Daniel Veillard
4a8ca1017f fix missing read-only access checks, fixes CVE-2008-5086
daniel
2008-12-17 16:59:30 +00:00
Daniel Veillard
1e122ee5dc fixing #460510 2008-12-12 07:37:16 +00:00
Daniel Veillard
6a6307bcdc Update to 0.5.1, Daniel 2008-12-05 05:38:54 +00:00
Ignacio Vazquez-Abrams
6e8332946a Rebuild for Python 2.6 2008-11-29 16:48:07 +00:00
Daniel Veillard
982683e56f removing old patch now upstream, Daniel 2008-11-26 09:15:42 +00:00
Daniel Veillard
7244d1a339 Upstream release 0.5.0, Daniel 2008-11-26 08:50:10 +00:00
Daniel Veillard
2a3935580c Fix for #465274, Daniel 2008-10-02 14:59:55 +00:00
Daniel Veillard
28f7f11450 - apply the python makefile patch for #463733
daniel
2008-09-24 13:34:20 +00:00
Daniel Veillard
ca07bc4597 Try to fix ppc64 build, rev'ing and updating changelog, Daniel 2008-09-24 07:19:01 +00:00
Daniel Veillard
8e23194a2b Apparently make force-tag doesn't exist anymore, so rev'ing, Daniel 2008-09-24 07:16:32 +00:00
Daniel Veillard
fe09090e2d Fix a build failure in ppc64 for unpackaged file since without_qemu
Daniel
2008-09-24 07:10:11 +00:00
Daniel Veillard
b5868cf8cf More cleanups, Daniel 2008-09-23 21:27:13 +00:00
Daniel Veillard
f294b40ba5 Upstream release 0.4.6 2008-09-23 21:25:17 +00:00
Daniel Veillard
c0c1a7bb79 Avoid a segfault if missing an emulator, Daniel 2008-09-09 15:02:19 +00:00
Daniel Veillard
1b864048bd removing old patch, daniel 2008-09-08 16:56:21 +00:00
Daniel Veillard
072c9c45ab New upstream version, daniel 2008-09-08 16:55:43 +00:00
Tom Callaway
af111679c3 fix license tag 2008-08-07 17:24:05 +00:00
Daniel P. Berrange
dd9f21eaa2 Fix CDROM boot for KVM guests (rhbz #452355) 2008-07-08 13:10:54 +00:00
Daniel Veillard
f0e356df98 Upstream release 0.4.4 2008-06-25 09:06:35 +00:00
Daniel Veillard
140bcf9ffc upstream release 0.4.3 2008-06-12 16:27:33 +00:00
Daniel Veillard
af69660412 Upstream release 0.4.3 2008-06-12 16:23:19 +00:00
Mark McLoughlin
6dc94c6252 Ensure %{fedora} is evaluated correctly 2008-06-04 17:49:02 +00:00
Mark McLoughlin
eb34165670 * Wed Jun 4 2008 Mark McLoughlin <markmc@redhat.com> - 0.4.2-6.fc10
- Disable lokkit support again (#449996, #447633)
2008-06-04 17:34:26 +00:00
Daniel P. Berrange
7ce08f2148 Rebuild to fix policykit enablement (rhbz #446616) 2008-05-15 21:34:28 +00:00
Daniel P. Berrange
049a8c79d9 Added /var/lib/libvirt/boot for kernel/initrd images under SElinux policy 2008-05-09 16:58:53 +00:00
Mark McLoughlin
f7a6d90012 s/--without_qemu/--without-qemu/ 2008-04-28 15:58:33 +00:00
Mark McLoughlin
67a2f29a89 * Mon Apr 28 2008 Mark McLoughlin <markmc@redhat.com> - 0.4.2-3.fc10
- Simplify the way arch conditionals are handled
2008-04-28 15:28:24 +00:00
Mark McLoughlin
82422fa1ff Only include proxy in %files on arches where xen is built 2008-04-28 10:24:38 +00:00
Mark McLoughlin
a73cf1d010 * Mon Apr 28 2008 Mark McLoughlin <markmc@redhat.com> - 0.4.2-2.fc10
- Enable lokkit support (#443796)
2008-04-28 09:20:33 +00:00
Daniel Veillard
481419ebb6 upstream release of 0.4.2, remove old patches, daniel 2008-04-08 16:38:36 +00:00
Daniel P. Berrange
1e65165c3a Don't do polkit auth as root 2008-04-04 15:29:00 +00:00
Chris Lalancette
bca27d9111 Fix another bug in the fs handling, where the <source> tags when doing
dumpxml didn't match up with what was used to define the pool to begin with.
2008-03-28 18:45:49 +00:00
Chris Lalancette
08b9144b41 Add a couple of iscsi patches to the storage backend; without these two
patches, iscsi storage support is incomplete (and won't work properly).
2008-03-27 19:18:59 +00:00
Daniel P. Berrange
2063007248 Fix QEMU media change, QEMU tap device setup, Xen boot device XML. Added default images directory 2008-03-13 15:31:57 +00:00
Daniel P. Berrange
81e46cb6da Fix daemon startup to avoid destroying networking 2008-03-10 21:36:01 +00:00
Daniel Veillard
263e2f2021 2 bugs found just after the release, Daniel 2008-03-03 16:55:24 +00:00
Daniel Veillard
2b9efc3de2 More crazyness around ppc64, Daniel 2008-03-03 16:03:24 +00:00
Daniel Veillard
69f6239766 Trying to work around ppc64 lacking any virtualization, Daniel 2008-03-03 15:43:06 +00:00
Daniel Veillard
bf744f9872 Release of 0.4.1, removal of old patches, spec file cleanup, Daniel 2008-03-03 15:14:14 +00:00
Jesse Keating
45b0b2bfa6 * Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.4.0-5
- Autorebuild for GCC 4.3
2008-02-20 06:45:43 +00:00
Daniel P. Berrange
f29ea218b7 Fix SSH tunnelling and XenD nodeinfo compat 2008-01-19 02:20:46 +00:00
Daniel P. Berrange
7d193b7810 Fix crash when no auth callback 2008-01-14 04:04:32 +00:00
Daniel P. Berrange
3182a4df5a Fixed auth callback crash and config file reading 2008-01-02 21:43:05 +00:00
Daniel Veillard
4f667910e9 Release of 0.4.0, the previous patches are not needed anymore.
Daniel
2007-12-18 10:44:34 +00:00
Bill Nottingham
b395a39f7b makefile update to properly grab makefile.common 2007-10-15 19:05:00 +00:00
Daniel P. Berrange
fdd7e87fe3 Added backport of patch for qemu driver config file 2007-10-15 18:23:02 +00:00
Daniel P. Berrange
f06c387ab5 Add i686 to arch list for Xen builds allowing 'make local' to do the right thing 2007-10-10 16:46:18 +00:00
Daniel Veillard
5ad8bc8190 Upstream release 0.3.3 2007-09-30 21:18:47 +00:00
Daniel Veillard
31802de821 Stupididy on the namagement of buildroots, daniel 2007-08-24 15:34:27 +00:00
Daniel Veillard
cc39758e17 Compile on arches without Xen, Daniel 2007-08-24 15:10:05 +00:00
Daniel Veillard
55fabd69c0 Release of 0.3.2, remove the old patch, Daniel 2007-08-21 15:14:54 +00:00
Daniel Veillard
b2a1a0e9ba Fixing missing Requires in libvirt-devel, Daniel 2007-08-16 15:16:44 +00:00
Daniel Veillard
cbe377ed29 Fix for bug #249594, Daniel 2007-07-26 15:35:55 +00:00
Jesse Keating
06a21e388f * Wed Jul 25 2007 Jesse Keating <jkeating@redhat.com> - 0.3.1-2
- Rebuild for RH #249435
2007-07-25 17:47:38 +00:00
Daniel Veillard
d1a886ab31 Upstream release 0.3.1, Daniel 2007-07-24 15:45:36 +00:00
Daniel Veillard
c70baa5133 Upstream release of 0.3.0 , removed old patches, Daniel 2007-07-09 12:40:55 +00:00
Daniel Veillard
52b4d91272 bvirt-0.2.3 upstream release, Daniel 2007-06-08 15:07:30 +00:00
Daniel P. Berrange
338630edc8 Fixed stack overflow. Fixed bridge network when no virtual net is running 2007-05-14 15:38:15 +00:00
13 changed files with 1272 additions and 346 deletions

View File

@@ -1,19 +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.2.tar.gz
libvirt-0.1.1.tar.gz
libvirt-0.1.3.tar.gz
libvirt-0.1.4.tar.gz
libvirt-0.1.5.tar.gz
libvirt-0.1.6.tar.gz
libvirt-0.1.7.tar.gz
libvirt-0.1.8.tar.gz
libvirt-0.1.9.tar.gz
libvirt-0.1.10.tar.gz
libvirt-0.1.11.tar.gz
libvirt-0.2.0.tar.gz
libvirt-0.2.1.tar.gz
libvirt-0.2.2.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

View File

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

View File

@@ -1,15 +0,0 @@
diff -rup libvirt-0.2.2/src/xen_unified.c libvirt-0.2.2.new/src/xen_unified.c
--- libvirt-0.2.2/src/xen_unified.c 2007-04-17 04:38:52.000000000 -0400
+++ libvirt-0.2.2.new/src/xen_unified.c 2007-05-01 16:49:54.000000000 -0400
@@ -112,6 +112,11 @@ xenUnifiedOpen (virConnectPtr conn, cons
for (i = 0; i < nb_drivers; ++i) {
int failed_to_open = 1;
+ /* Only use XM driver for Xen <= 3.0.3 (ie xendConfigVersion <= 2) */
+ if (drivers[i] == &xenXMDriver &&
+ priv->xendConfigVersion > 2)
+ continue;
+
/* Ignore proxy for root */
if (i == proxy_offset && getuid() == 0)
continue;

View File

@@ -1,23 +0,0 @@
diff -rup libvirt-0.2.2/qemud/qemud.c libvirt-0.2.2.new/qemud/qemud.c
--- libvirt-0.2.2/qemud/qemud.c 2007-04-11 10:13:36.000000000 -0400
+++ libvirt-0.2.2.new/qemud/qemud.c 2007-05-01 16:51:15.000000000 -0400
@@ -1110,6 +1110,7 @@ qemudBuildDnsmasqArgv(struct qemud_serve
len =
1 + /* dnsmasq */
1 + /* --keep-in-foreground */
+ 1 + /* --strict-order */
1 + /* --bind-interfaces */
2 + /* --pid-file "" */
2 + /* --conf-file "" */
@@ -1133,6 +1134,11 @@ qemudBuildDnsmasqArgv(struct qemud_serve
APPEND_ARG(*argv, i++, "dnsmasq");
APPEND_ARG(*argv, i++, "--keep-in-foreground");
+ /*
+ * Needed to ensure dnsmasq uses same algorithm for processing
+ * multiple nameserver entries in /etc/resolv.conf as GLibC.
+ */
+ APPEND_ARG(*argv, i++, "--strict-order");
APPEND_ARG(*argv, i++, "--bind-interfaces");
APPEND_ARG(*argv, i++, "--pid-file");

View File

@@ -1,70 +0,0 @@
diff -rup libvirt-0.2.2.new/src/xend_internal.c libvirt-0.2.2/src/xend_internal.c
--- libvirt-0.2.2.new/src/xend_internal.c 2007-04-15 16:09:10.000000000 -0400
+++ libvirt-0.2.2/src/xend_internal.c 2007-05-03 14:52:42.000000000 -0400
@@ -1676,35 +1676,38 @@ xend_parse_sexp_desc(virConnectPtr conn,
}
}
- /* Graphics device (HVM <= 3.0.4, or PV <= 3.0.4) vnc config */
- tmp = sexpr_fmt_node(root, "domain/image/%s/vnc", hvm ? "hvm" : "linux");
- if (tmp != NULL) {
- if (tmp[0] == '1') {
- int port = xenStoreDomainGetVNCPort(conn, domid);
- const char *listenAddr = sexpr_fmt_node(root, "domain/image/%s/vnclisten", hvm ? "hvm" : "linux");
- const char *keymap = sexpr_fmt_node(root, "domain/image/%s/keymap", hvm ? "hvm" : "linux");
- /* For Xen >= 3.0.3, don't generate a fixed port mapping
- * because it will almost certainly be wrong ! Just leave
- * it as -1 which lets caller see that the VNC server isn't
- * present yet. Subsquent dumps of the XML will eventually
- * find the port in XenStore once VNC server has started
- */
- if (port == -1 && xendConfigVersion < 2)
- port = 5900 + domid;
- virBufferVSprintf(&buf, " <graphics type='vnc' port='%d'", port);
- if (listenAddr)
- virBufferVSprintf(&buf, " listen='%s'", listenAddr);
- if (keymap)
- virBufferVSprintf(&buf, " keymap='%s'", keymap);
- virBufferAdd(&buf, "/>\n", 3);
+ /* Graphics device (HVM <= 3.0.4, or PV <= 3.0.3) vnc config */
+ if ((hvm && xendConfigVersion < 4) ||
+ (!hvm && xendConfigVersion < 3)) {
+ tmp = sexpr_fmt_node(root, "domain/image/%s/vnc", hvm ? "hvm" : "linux");
+ if (tmp != NULL) {
+ if (tmp[0] == '1') {
+ int port = xenStoreDomainGetVNCPort(conn, domid);
+ const char *listenAddr = sexpr_fmt_node(root, "domain/image/%s/vnclisten", hvm ? "hvm" : "linux");
+ const char *keymap = sexpr_fmt_node(root, "domain/image/%s/keymap", hvm ? "hvm" : "linux");
+ /* For Xen >= 3.0.3, don't generate a fixed port mapping
+ * because it will almost certainly be wrong ! Just leave
+ * it as -1 which lets caller see that the VNC server isn't
+ * present yet. Subsquent dumps of the XML will eventually
+ * find the port in XenStore once VNC server has started
+ */
+ if (port == -1 && xendConfigVersion < 2)
+ port = 5900 + domid;
+ virBufferVSprintf(&buf, " <graphics type='vnc' port='%d'", port);
+ if (listenAddr)
+ virBufferVSprintf(&buf, " listen='%s'", listenAddr);
+ if (keymap)
+ virBufferVSprintf(&buf, " keymap='%s'", keymap);
+ virBufferAdd(&buf, "/>\n", 3);
+ }
}
- }
- /* Graphics device (HVM, or old (pre-3.0.4) style PV sdl config) */
- tmp = sexpr_fmt_node(root, "domain/image/%s/sdl", hvm ? "hvm" : "linux");
- if (tmp != NULL) {
- if (tmp[0] == '1')
- virBufferAdd(&buf, " <graphics type='sdl'/>\n", 27 );
+ /* Graphics device (HVM, or old (pre-3.0.4) style PV sdl config) */
+ tmp = sexpr_fmt_node(root, "domain/image/%s/sdl", hvm ? "hvm" : "linux");
+ if (tmp != NULL) {
+ if (tmp[0] == '1')
+ virBufferAdd(&buf, " <graphics type='sdl'/>\n", 27 );
+ }
}
tty = xenStoreDomainGetConsolePath(conn, domid);
Only in libvirt-0.2.2/src: xend_internal.c.orig

View File

@@ -1,128 +0,0 @@
diff -rup libvirt-0.2.2/qemud/conf.c libvirt-0.2.2.new/qemud/conf.c
--- libvirt-0.2.2/qemud/conf.c 2007-04-17 04:34:42.000000000 -0400
+++ libvirt-0.2.2.new/qemud/conf.c 2007-05-01 18:16:46.000000000 -0400
@@ -245,21 +245,25 @@ static int qemudExtractVersionInfo(const
cleanup1:
_exit(-1); /* Just in case */
} else { /* Parent */
- char help[4096]; /* Ought to be enough to hold QEMU help screen */
+ char help[8192]; /* Ought to be enough to hold QEMU help screen */
int got, ret = -1;
int major, minor, micro;
if (close(newstdout[1]) < 0)
goto cleanup2;
- reread:
- if ((got = read(newstdout[0], help, sizeof(help)-1)) < 0) {
- if (errno == EINTR)
- goto reread;
- goto cleanup2;
+ while (got < (sizeof(help)-1)) {
+ int len;
+ if ((len = read(newstdout[0], help+got, sizeof(help)-got-1)) <= 0) {
+ if (!len)
+ break;
+ if (errno == EINTR)
+ continue;
+ goto cleanup2;
+ }
+ got += len;
}
help[got] = '\0';
-
if (sscanf(help, "QEMU PC emulator version %d.%d.%d", &major,&minor, &micro) != 3) {
goto cleanup2;
}
@@ -267,6 +271,8 @@ static int qemudExtractVersionInfo(const
*version = (major * 1000 * 1000) + (minor * 1000) + micro;
if (strstr(help, "-no-kqemu"))
*flags |= QEMUD_CMD_FLAG_KQEMU;
+ if (strstr(help, "-no-reboot"))
+ *flags |= QEMUD_CMD_FLAG_NO_REBOOT;
if (*version >= 9000)
*flags |= QEMUD_CMD_FLAG_VNC_COLON;
ret = 0;
@@ -858,6 +864,22 @@ static struct qemud_vm_def *qemudParseXM
}
xmlXPathFreeObject(obj);
+
+ /* See if we disable reboots */
+ obj = xmlXPathEval(BAD_CAST "string(/domain/on_reboot)", ctxt);
+ if ((obj == NULL) || (obj->type != XPATH_STRING) ||
+ (obj->stringval == NULL) || (obj->stringval[0] == 0)) {
+ def->noReboot = 0;
+ } else {
+ if (!strcmp((char*)obj->stringval, "destroy"))
+ def->noReboot = 1;
+ else
+ def->noReboot = 0;
+ }
+ if (obj)
+ xmlXPathFreeObject(obj);
+
+
/* Extract OS type info */
obj = xmlXPathEval(BAD_CAST "string(/domain/os/type[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
@@ -1220,6 +1242,8 @@ int qemudBuildCommandLine(struct qemud_s
2 + /* cpus */
2 + /* boot device */
2 + /* monitor */
+ (server->qemuCmdFlags & QEMUD_CMD_FLAG_NO_REBOOT &&
+ vm->def->noReboot ? 1 : 0) + /* no-reboot */
(vm->def->features & QEMUD_FEATURE_ACPI ? 0 : 1) + /* acpi */
(vm->def->os.kernel[0] ? 2 : 0) + /* kernel */
(vm->def->os.initrd[0] ? 2 : 0) + /* initrd */
@@ -1255,6 +1279,11 @@ int qemudBuildCommandLine(struct qemud_s
goto no_memory;
if (!((*argv)[++n] = strdup("pty")))
goto no_memory;
+ if (server->qemuCmdFlags & QEMUD_CMD_FLAG_NO_REBOOT &&
+ vm->def->noReboot) {
+ if (!((*argv)[++n] = strdup("-no-reboot")))
+ goto no_memory;
+ }
if (!(vm->def->features & QEMUD_FEATURE_ACPI)) {
if (!((*argv)[++n] = strdup("-no-acpi")))
@@ -2517,6 +2546,17 @@ char *qemudGenerateXML(struct qemud_serv
goto no_memory;
}
+ if (bufferAdd(buf, " <on_poweroff>destroy</on_poweroff>\n", -1) < 0)
+ goto no_memory;
+ if (def->noReboot) {
+ if (bufferAdd(buf, " <on_reboot>destroy</on_reboot>\n", -1) < 0)
+ goto no_memory;
+ } else {
+ if (bufferAdd(buf, " <on_reboot>restart</on_reboot>\n", -1) < 0)
+ goto no_memory;
+ }
+ if (bufferAdd(buf, " <on_crash>destroy</on_crash>\n", -1) < 0)
+ goto no_memory;
if (bufferAdd(buf, " <devices>\n", -1) < 0)
goto no_memory;
diff -rup libvirt-0.2.2/qemud/internal.h libvirt-0.2.2.new/qemud/internal.h
--- libvirt-0.2.2/qemud/internal.h 2007-04-11 10:13:36.000000000 -0400
+++ libvirt-0.2.2.new/qemud/internal.h 2007-05-01 17:53:42.000000000 -0400
@@ -161,6 +161,7 @@ enum qemud_vm_grapics_type {
enum qemud_cmd_flags {
QEMUD_CMD_FLAG_KQEMU = 1,
QEMUD_CMD_FLAG_VNC_COLON = 2,
+ QEMUD_CMD_FLAG_NO_REBOOT = 4,
};
@@ -191,6 +192,8 @@ struct qemud_vm_def {
int maxmem;
int vcpus;
+ int noReboot;
+
struct qemud_vm_os_def os;
int features;
Only in libvirt-0.2.2.new/qemud: libvirt-0.2.2-qemu-noreboot.patch

View File

@@ -1,19 +0,0 @@
--- libvirt-0.2.2/ChangeLog.sync-restart 2007-05-02 13:07:21.719425000 -0400
+++ libvirt-0.2.2/ChangeLog 2007-05-02 13:08:23.204879000 -0400
@@ -0,0 +1,5 @@
+Wed May 2 17:55:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
+
+ * qemud/libvirtd.in: synchronously restart the daemon in
+ order to avoid https://bugzilla.redhat.com/238492
+
--- libvirt-0.2.2/qemud/libvirtd.in.sync-restart 2007-02-23 07:50:58.000000000 -0500
+++ libvirt-0.2.2/qemud/libvirtd.in 2007-05-02 13:08:23.209868000 -0400
@@ -34,7 +34,7 @@
stop() {
echo -n $"Stopping $SERVICE daemon: "
- killproc $PROCESS -TERM
+ killproc $PROCESS
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then

View 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.5.2

View 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.5.2

View File

@@ -0,0 +1,118 @@
From 096fc1216eb2654bbff376dcc5bb8177d6498f82 Mon Sep 17 00:00:00 2001
From: Daniel P. Berrange <berrange@redhat.com>
Date: Thu, 19 Nov 2009 12:16:30 +0000
Subject: [PATCH] Fix labelling on QEMU restore images
Even though QEMU does not directly open the saved image when
restoring, it must be correctly labelled to allow QEMU to
read from it because labelling is passed around with open
file descriptors.
The labelling should not allow writing to the saved image
again, only reading.
* src/qemu/qemu_driver.c: Label the save image when restoring
* src/security/security_driver.h: Add a virSecurityDomainSetSavedStateLabelRO
method for labelling a saved image for restore
* src/security/security_selinux.c: Implement labelling of RO
save images for restore
Fedora-patch: libvirt-qemu-save-restore-2.patch
---
src/qemu/qemu_driver.c | 11 ++++++++++-
src/security/security_driver.h | 5 +++++
src/security/security_selinux.c | 11 +++++++++++
3 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 171ac8f..e6abb05 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3266,7 +3266,7 @@ static int qemudDomainSave(virDomainPtr dom,
if (driver->securityDriver &&
driver->securityDriver->domainRestoreSavedStateLabel &&
- driver->securityDriver->domainRestoreSavedStateLabel(dom->conn, path) == -1)
+ driver->securityDriver->domainRestoreSavedStateLabel(dom->conn, vm, path) == -1)
goto cleanup;
ret = 0;
@@ -3813,6 +3813,11 @@ static int qemudDomainRestore(virConnectPtr conn,
}
def = NULL;
+ if (driver->securityDriver &&
+ driver->securityDriver->domainSetSavedStateLabelRO &&
+ driver->securityDriver->domainSetSavedStateLabelRO(conn, vm, path) == -1)
+ goto cleanup;
+
if (header.version == 2) {
const char *intermediate_argv[3] = { NULL, "-dc", NULL };
const char *prog = qemudSaveCompressionTypeToString(header.compressed);
@@ -3847,6 +3852,10 @@ static int qemudDomainRestore(virConnectPtr conn,
close(intermediatefd);
close(fd);
fd = -1;
+ if (driver->securityDriver &&
+ driver->securityDriver->domainRestoreSavedStateLabel &&
+ driver->securityDriver->domainRestoreSavedStateLabel(conn, vm, path) == -1)
+ VIR_WARN("Unable to restore labelling on %s", path);
if (ret < 0) {
if (!vm->persistent) {
virDomainRemoveInactive(&driver->domains,
diff --git a/src/security/security_driver.h b/src/security/security_driver.h
index 5514962..5144976 100644
--- a/src/security/security_driver.h
+++ b/src/security/security_driver.h
@@ -45,7 +45,11 @@ typedef int (*virSecurityDomainSetHostdevLabel) (virConnectPtr conn,
typedef int (*virSecurityDomainSetSavedStateLabel) (virConnectPtr conn,
virDomainObjPtr vm,
const char *savefile);
+typedef int (*virSecurityDomainSetSavedStateLabelRO) (virConnectPtr conn,
+ virDomainObjPtr vm,
+ const char *savefile);
typedef int (*virSecurityDomainRestoreSavedStateLabel) (virConnectPtr conn,
+ virDomainObjPtr vm,
const char *savefile);
typedef int (*virSecurityDomainGenLabel) (virConnectPtr conn,
virDomainObjPtr sec);
@@ -77,6 +81,7 @@ struct _virSecurityDriver {
virSecurityDomainRestoreHostdevLabel domainRestoreSecurityHostdevLabel;
virSecurityDomainSetHostdevLabel domainSetSecurityHostdevLabel;
virSecurityDomainSetSavedStateLabel domainSetSavedStateLabel;
+ virSecurityDomainSetSavedStateLabelRO domainSetSavedStateLabelRO;
virSecurityDomainRestoreSavedStateLabel domainRestoreSavedStateLabel;
/*
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 4f2d1d3..0c130e5 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -639,7 +639,17 @@ SELinuxSetSavedStateLabel(virConnectPtr conn,
static int
+SELinuxSetSavedStateLabelRO(virConnectPtr conn,
+ virDomainObjPtr vm ATTRIBUTE_UNUSED,
+ const char *savefile)
+{
+ return SELinuxSetFilecon(conn, savefile, default_content_context);
+}
+
+
+static int
SELinuxRestoreSavedStateLabel(virConnectPtr conn,
+ virDomainObjPtr vm ATTRIBUTE_UNUSED,
const char *savefile)
{
return SELinuxRestoreSecurityFileLabel(conn, savefile);
@@ -716,5 +726,6 @@ virSecurityDriver virSELinuxSecurityDriver = {
.domainSetSecurityHostdevLabel = SELinuxSetSecurityHostdevLabel,
.domainRestoreSecurityHostdevLabel = SELinuxRestoreSecurityHostdevLabel,
.domainSetSavedStateLabel = SELinuxSetSavedStateLabel,
+ .domainSetSavedStateLabelRO = SELinuxSetSavedStateLabelRO,
.domainRestoreSavedStateLabel = SELinuxRestoreSavedStateLabel,
};
--
1.6.5.2

View File

@@ -0,0 +1,168 @@
From 1151cdcad3f4b68478b076832843338256b94644 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.5.2

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
5abe4b1fd6b57948ce259036afdc9194 libvirt-0.2.2.tar.gz
133aead8c46c0601b6b37e024c6aa86a libvirt-0.7.2.tar.gz