Accepting request 73792 from Virtualization

Update Factory to libvirt 0.9.2

- fate#311371 Enhance yast to configure live migration for
  Xen and KVM
  add firewall service file for libvirt

- Invoke qemu instances as user:group qemu:qemu by default
  bnc#694883

- Update to libvirt 0.9.2
  - Framework for lock manager plugins
  - API for network config change transactions (netcf required)
  - flags for setting memory parameters
  - virDomainGetState public API
  - qemu: allow blkstat/blkinfo calls during migration
  - Introduce migration v3 API
  - Defining the Screenshot public API
  - public API for NMI injection
- spec file: Adjust some directory attributes to support running
  non-privileged qemu instances

- Remove vi_VN locale if suse_version < 11.3

- Enable cap_ng when building lxc support.

OBS-URL: https://build.opensuse.org/request/show/73792
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=78
This commit is contained in:
Sascha Peilicke 2011-06-16 08:15:50 +00:00 committed by Git OBS Bridge
commit 6500eeffc1
8 changed files with 105 additions and 44 deletions

View File

@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c
===================================================================
--- src/lxc/lxc_container.c.orig
+++ src/lxc/lxc_container.c
@@ -883,6 +883,9 @@ int lxcContainerStart(virDomainDefPtr de
@@ -879,6 +879,9 @@ int lxcContainerStart(virDomainDefPtr de
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
/* allocate a stack for the container */
@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c
if (VIR_ALLOC_N(stack, stacksize) < 0) {
virReportOOMError();
return -1;
@@ -901,7 +904,11 @@ int lxcContainerStart(virDomainDefPtr de
@@ -897,7 +900,11 @@ int lxcContainerStart(virDomainDefPtr de
flags |= CLONE_NEWNET;
}
@ -24,7 +24,7 @@ Index: src/lxc/lxc_container.c
VIR_FREE(stack);
VIR_DEBUG("clone() completed, new container PID is %d", pid);
@@ -928,6 +935,7 @@ int lxcContainerAvailable(int features)
@@ -924,6 +931,7 @@ int lxcContainerAvailable(int features)
char *childStack;
char *stack;
int childStatus;
@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c
if (features & LXC_CONTAINER_FEATURE_USER)
flags |= CLONE_NEWUSER;
@@ -935,14 +943,21 @@ int lxcContainerAvailable(int features)
@@ -931,14 +939,21 @@ int lxcContainerAvailable(int features)
if (features & LXC_CONTAINER_FEATURE_NET)
flags |= CLONE_NEWNET;
@ -41,7 +41,7 @@ Index: src/lxc/lxc_container.c
+ stacksize *= 2;
+#endif
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
VIR_DEBUG0("Unable to allocate stack");
VIR_DEBUG("Unable to allocate stack");
return -1;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2a2ff6a4e1855ca0d696c1c0d07674546ba893f8d74e3850e2d368e1f5dfba0d
size 10346535

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

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6125b2151c99df356b35a41c19744bcf90aad343d3ecf170a51fc1a24b0701ab
size 10791970

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Mon Jun 13 14:50:32 CST 2011 - lidongyang@novell.com
- fate#311371 Enhance yast to configure live migration for
Xen and KVM
add firewall service file for libvirt
-------------------------------------------------------------------
Thu Jun 9 09:38:44 MDT 2011 - jfehlig@suse.de
- Invoke qemu instances as user:group qemu:qemu by default
bnc#694883
-------------------------------------------------------------------
Mon Jun 6 11:40:13 MDT 2011 - jfehlig@suse.de
- Update to libvirt 0.9.2
- Framework for lock manager plugins
- API for network config change transactions (netcf required)
- flags for setting memory parameters
- virDomainGetState public API
- qemu: allow blkstat/blkinfo calls during migration
- Introduce migration v3 API
- Defining the Screenshot public API
- public API for NMI injection
- spec file: Adjust some directory attributes to support running
non-privileged qemu instances
-------------------------------------------------------------------
Mon May 15 15:53:21 MDT 2011 - jfehlig@suse.de
- Remove vi_VN locale if suse_version < 11.3
-------------------------------------------------------------------
Thu May 12 13:40:09 UTC 2011 - fcrozat@suse.com
- Enable cap_ng when building lxc support.
-------------------------------------------------------------------
Thu May 5 19:01:54 MDT 2011 - jfehlig@suse.de

View File

@ -17,6 +17,9 @@
# norootforbuild
# In the future, we may want a client only build, which will create a
# libvirt.so only containing the generic RPC driver and the test driver,
# but no libvirtd
# For now, default to a full server + client build
%define client_only 0
@ -126,8 +129,9 @@
%define with_hal 0%{!?_without_hal:%{server_drivers}}
%endif
# libcapng is used to manage capabilities in 11.3 or newer
%if 0%{?suse_version} >= 1130
# libcapng is used to manage capabilities in 11.3 or newer.
# It is also used by lxc and needs to be enabled if lxc is enabled.
%if 0%{?suse_version} >= 1130 || %{with_lxc}
%define with_capng 0%{!?_without_capng:1}
%endif
@ -147,6 +151,12 @@
%define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
%define with_libpcap 0%{!?_without_libpcap:%{server_drivers}}
%define with_macvtap 0%{!?_without_macvtap:%{server_drivers}}
# Force QEMU to run as qemu:qemu
%define qemu_user qemu
%define qemu_group qemu
%else
%define qemu_user root
%define qemu_group root
%endif
%endif
@ -160,6 +170,8 @@
%define with_network 0
%endif
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
BuildRequires: python-devel
BuildRequires: libxml2-devel
BuildRequires: xhtml-dtd
@ -268,7 +280,7 @@ Url: http://libvirt.org/
License: LGPLv2.1+
Group: Development/Libraries/C and C++
AutoReqProv: yes
Version: 0.9.1
Version: 0.9.2
Release: 1
Summary: A C toolkit to interract with the virtualization capabilities of Linux
@ -332,6 +344,7 @@ Recommends: device-mapper
Source0: %{name}-%{version}.tar.bz2
Source1: libvirtd.init
Source2: libvirtd-relocation-server.fw
# Upstream patches
# Need to go upstream
Patch100: xen-name-for-devid.patch
@ -426,7 +439,6 @@ Authors:
Karel Zak <kzak@redhat.com>
%if %{with_python}
%package python
License: LGPLv2.1+
Summary: A C toolkit to interract with the virtualization capabilities of Linux
@ -587,6 +599,8 @@ export CFLAGS="$RPM_OPT_FLAGS"
%{?_without_libpcap} \
--libexecdir=%{_libdir}/%{name} \
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \
--with-qemu-user=%{qemu_user} \
--with-qemu-group=%{qemu_group} \
--with-init-script=redhat \
ac_cv_path_MODPROBE=/sbin/modprobe \
ac_cv_path_UDEVADM=/sbin/udevadm \
@ -599,6 +613,9 @@ cp -a AUTHORS ChangeLog COPYING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{nam
cd docs ; cp -a *.html $RPM_BUILD_ROOT%{_docdir}/%{name} ; cp -a *.png $RPM_BUILD_ROOT%{_docdir}/%{name} ; cd ..
# remove currently unsupported locale(s)
rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin
%if 0%{?suse_version} < 1130
rm -rf $RPM_BUILD_ROOT/usr/share/locale/vi_VN
%endif
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt
rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a
%find_lang %{name}
@ -658,6 +675,10 @@ install %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirtd
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT%{_sbindir}/rclibvirtd
%endif
ln -s /etc/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sbindir}/rclibvirt-guests
#install firewall definitions format is described here:
#/usr/share/SuSEfirewall2/services/TEMPLATE
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_fwdefdir}/libvirtd-relocation-server
%clean
rm -rf $RPM_BUILD_ROOT
@ -700,7 +721,6 @@ fi
%postun client -p /sbin/ldconfig
%if %{with_libvirtd}
%files
%defattr(-, root, root)
%{_sbindir}/libvirtd
@ -723,9 +743,9 @@ fi
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
%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/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
%if %{with_polkit}
%if 0%{?suse_version} > 1110
@ -738,8 +758,8 @@ fi
%if %{with_qemu}
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
%endif
%if %{with_lxc}
@ -759,11 +779,12 @@ fi
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
%endif
%if %{with_storage_disk}
%{_libdir}/%{name}/libvirt_parthelper
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_parthelper
%endif
%{_libdir}/%{name}/libvirt_iohelper
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_iohelper
%doc %{_mandir}/man8/libvirtd.8*
%endif
%config %{_fwdefdir}/libvirtd-relocation-server
%files client -f %{name}.lang
%defattr(-, root, root)
@ -817,7 +838,6 @@ fi
%doc %{_docdir}/%{name}/html
%if %{with_python}
%files python
%defattr(-, root, root)
%doc %{_docdir}/%{name}-python

View File

@ -0,0 +1,3 @@
## Name: Libvirtd Relocation Server
## Description: Enables libvirtd plain relocation service
TCP="49152:49215"

View File

@ -1,7 +1,7 @@
Index: libvirt-0.9.1/tools/Makefile.am
Index: libvirt-0.9.2/tools/Makefile.am
===================================================================
--- libvirt-0.9.1.orig/tools/Makefile.am
+++ libvirt-0.9.1/tools/Makefile.am
--- libvirt-0.9.2.orig/tools/Makefile.am
+++ libvirt-0.9.2/tools/Makefile.am
@@ -131,16 +131,17 @@ uninstall-local: uninstall-init
if LIBVIRT_INIT_SCRIPT_RED_HAT
@ -26,10 +26,10 @@ Index: libvirt-0.9.1/tools/Makefile.am
BUILT_SOURCES += libvirt-guests.init
Index: libvirt-0.9.1/tools/libvirt-guests.sysconf
Index: libvirt-0.9.2/tools/libvirt-guests.sysconf
===================================================================
--- libvirt-0.9.1.orig/tools/libvirt-guests.sysconf
+++ libvirt-0.9.1/tools/libvirt-guests.sysconf
--- libvirt-0.9.2.orig/tools/libvirt-guests.sysconf
+++ libvirt-0.9.2/tools/libvirt-guests.sysconf
@@ -1,18 +1,28 @@
+## Path: System/Virtualization/libvirt
+
@ -74,10 +74,10 @@ Index: libvirt-0.9.1/tools/libvirt-guests.sysconf
# number of seconds we're willing to wait for a guest to shut down
-#SHUTDOWN_TIMEOUT=0
+SHUTDOWN_TIMEOUT=120
Index: libvirt-0.9.1/tools/libvirt-guests.init.sh
Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
===================================================================
--- libvirt-0.9.1.orig/tools/libvirt-guests.init.sh
+++ libvirt-0.9.1/tools/libvirt-guests.init.sh
--- libvirt-0.9.2.orig/tools/libvirt-guests.init.sh
+++ libvirt-0.9.2/tools/libvirt-guests.init.sh
@@ -4,10 +4,10 @@
#
### BEGIN INIT INFO
@ -220,11 +220,11 @@ Index: libvirt-0.9.1/tools/libvirt-guests.init.sh
esac
-exit $RETVAL
+rc_exit
Index: libvirt-0.9.1/daemon/Makefile.am
Index: libvirt-0.9.2/daemon/Makefile.am
===================================================================
--- libvirt-0.9.1.orig/daemon/Makefile.am
+++ libvirt-0.9.1/daemon/Makefile.am
@@ -281,16 +281,12 @@ install-logrotate: $(LOGROTATE_CONFS)
--- libvirt-0.9.2.orig/daemon/Makefile.am
+++ libvirt-0.9.2/daemon/Makefile.am
@@ -302,16 +302,12 @@ install-logrotate: $(LOGROTATE_CONFS)
if LIBVIRT_INIT_SCRIPT_RED_HAT
install-init: libvirtd.init

View File

@ -13,11 +13,11 @@ Date: Wed Jan 27 16:11:41 2010 -0700
This approach allows removing a disk when domain is inactive. We
obviously can't search xenstore when the domain is inactive.
Index: libvirt-0.9.1/src/xen/xend_internal.c
Index: libvirt-0.9.2/src/xen/xend_internal.c
===================================================================
--- libvirt-0.9.1.orig/src/xen/xend_internal.c
+++ libvirt-0.9.1/src/xen/xend_internal.c
@@ -62,6 +62,7 @@
--- libvirt-0.9.2.orig/src/xen/xend_internal.c
+++ libvirt-0.9.2/src/xen/xend_internal.c
@@ -60,6 +60,7 @@
static int
virDomainXMLDevID(virDomainPtr domain,
@ -25,7 +25,7 @@ Index: libvirt-0.9.1/src/xen/xend_internal.c
virDomainDeviceDefPtr dev,
char *class,
char *ref,
@@ -2731,7 +2732,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
@@ -2780,7 +2781,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
sexpr = virBufferContentAndReset(&buf);
@ -34,7 +34,7 @@ Index: libvirt-0.9.1/src/xen/xend_internal.c
/* device doesn't exist, define it */
ret = xend_op(domain->conn, domain->name, "op", "device_create",
"config", sexpr, NULL);
@@ -2854,7 +2855,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
@@ -2903,7 +2904,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
sexpr = virBufferContentAndReset(&buf);
@ -43,7 +43,7 @@ Index: libvirt-0.9.1/src/xen/xend_internal.c
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
_("requested device does not exist"));
goto cleanup;
@@ -2947,7 +2948,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
@@ -2996,7 +2997,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
def, xml, VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@ -52,7 +52,7 @@ Index: libvirt-0.9.1/src/xen/xend_internal.c
goto cleanup;
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
@@ -3900,6 +3901,7 @@ struct xenUnifiedDriver xenDaemonDriver
@@ -3961,6 +3962,7 @@ struct xenUnifiedDriver xenDaemonDriver
*/
static int
virDomainXMLDevID(virDomainPtr domain,
@ -60,7 +60,7 @@ Index: libvirt-0.9.1/src/xen/xend_internal.c
virDomainDeviceDefPtr dev,
char *class,
char *ref,
@@ -3908,8 +3910,12 @@ virDomainXMLDevID(virDomainPtr domain,
@@ -3969,8 +3971,12 @@ virDomainXMLDevID(virDomainPtr domain,
xenUnifiedPrivatePtr priv = domain->conn->privateData;
char *xref;
char *tmp;
@ -73,7 +73,7 @@ Index: libvirt-0.9.1/src/xen/xend_internal.c
if (dev->data.disk->driverName &&
STREQ(dev->data.disk->driverName, "tap"))
strcpy(class, "tap");
@@ -3919,19 +3925,21 @@ virDomainXMLDevID(virDomainPtr domain,
@@ -3980,19 +3986,21 @@ virDomainXMLDevID(virDomainPtr domain,
else
strcpy(class, "vbd");