Accepting request 229021 from Virtualization

cleanup after upgrade to 1.2.3 (forwarded request 229020 from cbosdonnat)

OBS-URL: https://build.opensuse.org/request/show/229021
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=142
This commit is contained in:
Stephan Kulow 2014-04-05 14:47:23 +00:00 committed by Git OBS Bridge
commit 8e87947262
13 changed files with 127 additions and 127 deletions

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.2/tests/vircgrouptest.c
Index: libvirt-1.2.3/tests/vircgrouptest.c
===================================================================
--- libvirt-1.2.2.orig/tests/vircgrouptest.c
+++ libvirt-1.2.2/tests/vircgrouptest.c
--- libvirt-1.2.3.orig/tests/vircgrouptest.c
+++ libvirt-1.2.3/tests/vircgrouptest.c
@@ -33,7 +33,6 @@
# include "virlog.h"
# include "virfile.h"
@ -10,7 +10,7 @@ Index: libvirt-1.2.2/tests/vircgrouptest.c
# define VIR_FROM_THIS VIR_FROM_NONE
@@ -531,68 +530,6 @@ static int testCgroupAvailable(const voi
@@ -533,68 +532,6 @@ static int testCgroupAvailable(const voi
return 0;
}
@ -71,7 +71,7 @@ Index: libvirt-1.2.2/tests/vircgrouptest.c
-
- ret = 0;
-
-cleanup:
- cleanup:
- virCgroupFree(&cgroup);
- return ret;
-}
@ -79,7 +79,7 @@ Index: libvirt-1.2.2/tests/vircgrouptest.c
static int testCgroupGetMemoryUsage(const void *args ATTRIBUTE_UNUSED)
{
virCgroupPtr cgroup = NULL;
@@ -798,9 +735,6 @@ mymain(void)
@@ -800,9 +737,6 @@ mymain(void)
if (virtTestRun("virCgroupGetMemoryUsage works", testCgroupGetMemoryUsage, NULL) < 0)
ret = -1;

View File

@ -1,19 +1,13 @@
Index: libvirt-1.2.2/examples/apparmor/Makefile.am
Index: libvirt-1.2.3/examples/apparmor/Makefile.am
===================================================================
--- libvirt-1.2.2.orig/examples/apparmor/Makefile.am
+++ libvirt-1.2.2/examples/apparmor/Makefile.am
@@ -14,13 +14,25 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
-EXTRA_DIST= \
- TEMPLATE \
- libvirt-qemu \
--- libvirt-1.2.3.orig/examples/apparmor/Makefile.am
+++ libvirt-1.2.3/examples/apparmor/Makefile.am
@@ -18,10 +18,22 @@ EXTRA_DIST= \
TEMPLATE \
libvirt-qemu \
libvirt-lxc \
- usr.lib.libvirt.virt-aa-helper \
- usr.sbin.libvirtd
+EXTRA_DIST= \
+ TEMPLATE \
+ libvirt-qemu \
+ usr.lib.libvirt.virt-aa-helper.in \
+ usr.sbin.libvirtd.in
@ -33,10 +27,10 @@ Index: libvirt-1.2.2/examples/apparmor/Makefile.am
apparmordir = $(sysconfdir)/apparmor.d/
apparmor_DATA = \
usr.lib.libvirt.virt-aa-helper \
Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
Index: libvirt-1.2.3/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
===================================================================
--- /dev/null
+++ libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
+++ libvirt-1.2.3/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
@@ -0,0 +1,48 @@
+# Last Modified: Mon Apr 5 15:10:27 2010
+#include <tunables/global>
@ -86,11 +80,11 @@ Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
+ /**.[iI][sS][oO] r,
+ /**/disk{,.*} r,
+}
Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in
Index: libvirt-1.2.3/examples/apparmor/usr.sbin.libvirtd.in
===================================================================
--- /dev/null
+++ libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in
@@ -0,0 +1,66 @@
+++ libvirt-1.2.3/examples/apparmor/usr.sbin.libvirtd.in
@@ -0,0 +1,67 @@
+# Last Modified: Mon Apr 5 15:03:58 2010
+#include <tunables/global>
+@{LIBVIRT}="libvirt"
@ -106,7 +100,6 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in
+ capability sys_admin,
+ capability sys_module,
+ capability sys_ptrace,
+ capability sys_pacct,
+ capability sys_nice,
+ capability sys_chroot,
+ capability setuid,
@ -118,7 +111,9 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in
+ capability mknod,
+ capability fsetid,
+ capability audit_write,
+ capability ipc_lock,
+
+ # Needed for vfio
+ capability sys_resource,
+
+ network inet stream,
+ network inet dgram,
@ -157,9 +152,9 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in
+ change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
+
+}
Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper
Index: libvirt-1.2.3/examples/apparmor/usr.lib.libvirt.virt-aa-helper
===================================================================
--- libvirt-1.2.2.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
--- libvirt-1.2.3.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
+++ /dev/null
@@ -1,48 +0,0 @@
-# Last Modified: Mon Apr 5 15:10:27 2010
@ -210,11 +205,11 @@ Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper
- /**.[iI][sS][oO] r,
- /**/disk{,.*} r,
-}
Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd
Index: libvirt-1.2.3/examples/apparmor/usr.sbin.libvirtd
===================================================================
--- libvirt-1.2.2.orig/examples/apparmor/usr.sbin.libvirtd
--- libvirt-1.2.3.orig/examples/apparmor/usr.sbin.libvirtd
+++ /dev/null
@@ -1,60 +0,0 @@
@@ -1,63 +0,0 @@
-# Last Modified: Mon Apr 5 15:03:58 2010
-#include <tunables/global>
-@{LIBVIRT}="libvirt"
@ -242,6 +237,9 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd
- capability fsetid,
- capability audit_write,
-
- # Needed for vfio
- capability sys_resource,
-
- network inet stream,
- network inet dgram,
- network inet6 stream,

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:237074ec79c2de75c79c05dfaa074543ae5fd75261e7e1f9fc4b8a424bf96692
size 20497389

3
libvirt-1.2.3.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:030e1da22cbdd98427de96f087e0fbea5f15a2685799af161b4001f287175973
size 20734026

View File

@ -128,7 +128,7 @@ Index: libvirt-1.2.2/src/interface/interface_backend_netcf.c
+ vp = VIR_LOG_DEBUG;
+ break;
+ }
+ virLogMessage(VIR_LOG_FROM_FILE, vp, file, line, func, 0, "%s", msg);
+ virLogMessage(&virLogSelf, vp, file, line, func, 0, "%s", msg);
+}
+#endif

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Wed Apr 2 13:38:50 UTC 2014 - cbosdonnat@suse.com
- Removed libxl-hvm-vnc.patch: went upstream in another form
-------------------------------------------------------------------
Wed Apr 2 12:06:04 UTC 2014 - cbosdonnat@suse.com
- Update to libvirt 1.2.3
- add new virDomainCoreDumpWithFormat API
- conf: Introduce virDomainDeviceGetInfo API
- more features and fixes on bhyve driver
- lot of cleanups and improvement on the Xen driver
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
-------------------------------------------------------------------
Fri Mar 14 13:44:06 MDT 2014 - jfehlig@suse.com

View File

@ -235,7 +235,7 @@
Name: libvirt
Url: http://libvirt.org/
Version: 1.2.2
Version: 1.2.3
Release: 0
Summary: Library providing a simple virtualization API
License: LGPL-2.1+
@ -432,7 +432,6 @@ Source99: baselibs.conf
Patch100: xen-name-for-devid.patch
Patch101: ia64-clone.patch
Patch102: xen-pv-cdrom.patch
Patch103: libxl-hvm-vnc.patch
# Our patches
Patch200: libvirtd-defaults.patch
Patch201: libvirtd-init-script.patch
@ -947,7 +946,6 @@ namespaces.
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch200 -p1
%patch201 -p1
%patch202 -p1
@ -1211,10 +1209,6 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
# Strip auto-generated UUID - we need it generated per-install
sed -i -e "/<uuid>/d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
cat > $RPM_BUILD_ROOT%{_docdir}/libvirt/libvirt-daemon-config-network.README << 'EOF'
Any empty package containing only a post install scriptlet that ensures
a default network is defined.
EOF
%else
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
@ -1319,7 +1313,8 @@ rm -rf $RPM_BUILD_ROOT
cd tests
make
# These tests don't current work in a mock build root
for i in nodeinfotest seclabeltest
# qemuargv2xmltest: needs qemu user/group to be setup
for i in nodeinfotest seclabeltest qemuxml2argvtest
do
rm -f $i
printf 'int main(void) { return 0; }' > $i.c
@ -1475,14 +1470,17 @@ fi
%config(noreplace) %{_sysconfdir}/apparmor.d/usr.sbin.libvirtd
%config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.libvirt.virt-aa-helper
%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/libvirt-qemu
%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/libvirt-lxc
%config(noreplace) %{_sysconfdir}/apparmor.d/libvirt/TEMPLATE
%{_libdir}/%{name}/virt-aa-helper
%endif
%config %{_fwdefdir}/libvirtd-relocation-server
%if ! %{with_driver_modules}
%if %{with_network}
%if %{with_network} || %{with_qemu}
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
%endif
%if %{with_network}
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
@ -1490,6 +1488,9 @@ fi
%dir %{_datadir}/libvirt/networks/
%{_datadir}/libvirt/networks/default.xml
%endif
%if %{with_nwfilter}
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
%endif
%if %{with_qemu}
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
@ -1529,7 +1530,8 @@ fi
%files daemon-config-network
%defattr(-, root, root)
%doc %{_docdir}/%{name}/libvirt-daemon-config-network.README
%dir %{_datadir}/libvirt/networks/
%{_datadir}/libvirt/networks/default.xml
%endif
%if %{with_nwfilter}
@ -1556,8 +1558,6 @@ fi
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
%dir %{_datadir}/libvirt/networks/
%{_datadir}/libvirt/networks/default.xml
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
%dir %{_libdir}/%{name}/connection-driver
@ -1576,6 +1576,7 @@ fi
%files daemon-driver-nwfilter
%defattr(-, root, root)
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
%dir %{_libdir}/%{name}/connection-driver
%{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so
%endif

View File

@ -26,3 +26,16 @@ Index: libvirt-1.2.2/daemon/libvirtd-config.c
data->listen_tcp = 0;
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
Index: libvirt-1.2.3/daemon/test_libvirtd.aug.in
===================================================================
--- libvirt-1.2.3.orig/daemon/test_libvirtd.aug.in
+++ libvirt-1.2.3/daemon/test_libvirtd.aug.in
@@ -2,7 +2,7 @@ module Test_libvirtd =
::CONFIG::
test Libvirtd.lns get conf =
- { "listen_tls" = "0" }
+ { "listen_tls" = "1" }
{ "listen_tcp" = "1" }
{ "tls_port" = "16514" }
{ "tcp_port" = "16509" }

View File

@ -1,9 +1,9 @@
Adjust libvirtd sysconfig file to conform to SUSE standards
Index: libvirt-1.2.2/daemon/libvirtd.sysconf
Index: libvirt-1.2.3/daemon/libvirtd.sysconf
===================================================================
--- libvirt-1.2.2.orig/daemon/libvirtd.sysconf
+++ libvirt-1.2.2/daemon/libvirtd.sysconf
--- libvirt-1.2.3.orig/daemon/libvirtd.sysconf
+++ libvirt-1.2.3/daemon/libvirtd.sysconf
@@ -1,16 +1,25 @@
+## Path: System/Virtualization/libvirt
+
@ -34,13 +34,31 @@ Index: libvirt-1.2.2/daemon/libvirtd.sysconf
# Override the QEMU/SDL default audio driver probing when
# starting virtual machines using SDL graphics
#
@@ -20,5 +29,7 @@
@@ -20,14 +29,16 @@
#
#SDL_AUDIODRIVER=pulse
-# Override the maximum number of opened files
-# Override the maximum number of opened files.
-# This only works with traditional init scripts.
-# In the systemd world, the limit can only be changed by overriding
-# LimitNOFILE for libvirtd.service. To do that, just create a *.conf
-# file in /etc/systemd/system/libvirtd.service.d/ (for example
-# /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write
-# the following two lines in it:
-# [Service]
-# LimitNOFILE=2048
-#
-#LIBVIRTD_NOFILES_LIMIT=2048
+## Type: integer
+## Default: 2048
+## Override the maximum number of opened files
+## Override the maximum number of opened files.
+## This only works with traditional init scripts.
+## In the systemd world, the limit can only be changed by overriding
+## LimitNOFILE for libvirtd.service. To do that, just create a *.conf
+## file in /etc/systemd/system/libvirtd.service.d/ (for example
+## /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write
+## the following two lines in it:
+## [Service]
+## LimitNOFILE=2048
+##
+LIBVIRTD_NOFILES_LIMIT=2048

View File

@ -1,45 +0,0 @@
Index: libvirt-1.2.2/src/libxl/libxl_conf.c
===================================================================
--- libvirt-1.2.2.orig/src/libxl/libxl_conf.c
+++ libvirt-1.2.2/src/libxl/libxl_conf.c
@@ -565,6 +565,30 @@ libxlMakeChrdevStr(virDomainChrDefPtr de
}
static int
+libxlFixupDomBuildInfo(virDomainDefPtr def, libxl_domain_config *d_config)
+{
+ libxl_domain_build_info *b_info = &d_config->b_info;
+ int hvm = STREQ(def->os.type, "hvm");
+ libxl_device_vfb vfb;
+
+ if (!hvm)
+ return 0;
+
+ if (d_config->num_vfbs) {
+ vfb = d_config->vfbs[0];
+ if (libxl_defbool_val(vfb.vnc.enable))
+ memcpy(&b_info->u.hvm.vnc, &vfb.vnc, sizeof(libxl_vnc_info));
+ else if (libxl_defbool_val(vfb.sdl.enable))
+ memcpy(&b_info->u.hvm.sdl, &vfb.sdl, sizeof(libxl_sdl_info));
+ else
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int
libxlMakeDomBuildInfo(virDomainObjPtr vm, libxl_domain_config *d_config)
{
virDomainDefPtr def = vm->def;
@@ -1195,6 +1219,9 @@ libxlBuildDomainConfig(libxlDriverPrivat
if (libxlMakeVfbList(driver, def, d_config) < 0)
return -1;
+ if (libxlFixupDomBuildInfo(def, d_config) < 0)
+ return -1;
+
d_config->on_reboot = def->onReboot;
d_config->on_poweroff = def->onPoweroff;
d_config->on_crash = def->onCrash;

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.2/src/qemu/qemu.conf
Index: libvirt-1.2.3/src/qemu/qemu.conf
===================================================================
--- libvirt-1.2.2.orig/src/qemu/qemu.conf
+++ libvirt-1.2.2/src/qemu/qemu.conf
--- libvirt-1.2.3.orig/src/qemu/qemu.conf
+++ libvirt-1.2.3/src/qemu/qemu.conf
@@ -200,7 +200,16 @@
# a special value; security_driver can be set to that value in
# isolation, but it cannot appear in a list of drivers.
@ -19,13 +19,15 @@ Index: libvirt-1.2.2/src/qemu/qemu.conf
# If set to non-zero, then the default security labeling
# will make guests confined. If set to zero, then guests
@@ -402,10 +411,25 @@
@@ -402,11 +411,22 @@
#allow_disk_format_probing = 1
-# To enable 'Sanlock' project based locking of the file
-# content (to prevent two VMs writing to the same
-# disk), uncomment this
-# In order to prevent accidentally starting two domains that
-# share one writable disk, libvirt offers two approaches for
-# locking files. The first one is sanlock, the other one,
-# virtlockd, is then our own implementation. Accepted values
-# are "sanlock" and "lockd".
+# SUSE note:
+# Two lock managers are supported: lockd and sanlock. lockd, which
+# is provided by the virtlockd service, uses advisory locks (flock(2))
@ -40,11 +42,8 @@ Index: libvirt-1.2.2/src/qemu/qemu.conf
+# has the disadvantage of not being able to be restarted without
+# first terminating all virtual machines for which it holds leases.
+#
+# To enable lockd or sanlock based protection of virtual machine disk
+# content (to prevent two VMs writing to the same disk), uncomment one
+# of the following
+# Specify lockd or sanlock to enable protection of virtual machine disk
+# content.
#
+#lock_manager = "lockd"
#lock_manager = "sanlock"
#lock_manager = "lockd"

View File

@ -1,11 +1,11 @@
Index: libvirt-1.2.2/daemon/libvirtd.service.in
Index: libvirt-1.2.3/daemon/libvirtd.service.in
===================================================================
--- libvirt-1.2.2.orig/daemon/libvirtd.service.in
+++ libvirt-1.2.2/daemon/libvirtd.service.in
@@ -9,6 +9,8 @@ Before=libvirt-guests.service
After=network.target
--- libvirt-1.2.3.orig/daemon/libvirtd.service.in
+++ libvirt-1.2.3/daemon/libvirtd.service.in
@@ -10,6 +10,8 @@ After=network.target
After=dbus.service
After=iscsid.service
After=apparmor.service
+Wants=xencommons.service
+After=xencommons.service
Documentation=man:libvirtd(8)

View File

@ -14,11 +14,11 @@
is inactive. We obviously can't search xenstore when the domain is
inactive.
Index: libvirt-1.2.2/src/xen/xend_internal.c
Index: libvirt-1.2.3/src/xen/xend_internal.c
===================================================================
--- libvirt-1.2.2.orig/src/xen/xend_internal.c
+++ libvirt-1.2.2/src/xen/xend_internal.c
@@ -70,7 +70,7 @@
--- libvirt-1.2.3.orig/src/xen/xend_internal.c
+++ libvirt-1.2.3/src/xen/xend_internal.c
@@ -72,7 +72,7 @@ VIR_LOG_INIT("xen.xend_internal");
#define XEND_RCV_BUF_MAX_LEN (256 * 1024)
static int
@ -27,7 +27,7 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c
virDomainDeviceDefPtr dev, char *class,
char *ref, int ref_len);
@@ -3326,18 +3326,18 @@ xenDaemonDomainBlockPeek(virConnectPtr c
@@ -3328,37 +3328,35 @@ xenDaemonDomainBlockPeek(virConnectPtr c
* Returns 0 in case of success, -1 in case of failure.
*/
static int
@ -43,14 +43,13 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c
- char *xref;
- char *tmp;
+ unsigned int i;
const char *driver = virDomainDiskGetDriver(dev->data.disk);
if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
+ if (dev->data.disk->dst == NULL)
+ return -1;
if (dev->data.disk->driverName &&
STREQ(dev->data.disk->driverName, "tap"))
strcpy(class, "tap");
@@ -3347,19 +3347,17 @@ virDomainXMLDevID(virConnectPtr conn,
if (STREQ_NULLABLE(driver, "tap") || STREQ_NULLABLE(driver, "tap2"))
strcpy(class, driver);
else
strcpy(class, "vbd");
@ -81,7 +80,7 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c
} else if (dev->type == VIR_DOMAIN_DEVICE_NET) {
char mac[VIR_MAC_STRING_BUFLEN];
virDomainNetDefPtr netdef = dev->data.net;
@@ -3367,16 +3365,22 @@ virDomainXMLDevID(virConnectPtr conn,
@@ -3366,16 +3364,22 @@ virDomainXMLDevID(virConnectPtr conn,
strcpy(class, "vif");
@ -114,7 +113,7 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c
} else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV &&
dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
dev->data.hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
@@ -3392,17 +3396,44 @@ virDomainXMLDevID(virConnectPtr conn,
@@ -3391,17 +3395,44 @@ virDomainXMLDevID(virConnectPtr conn,
strcpy(class, "pci");