Accepting request 769141 from Virtualization
Updated libvirt package for Factory that fixes several rpmlint warnings. SR#768836 sent to add 'sanlock' and 'libvirt' to StandardGroups in rpmlint package. - spec: Fix several rpmlint warnings 72ed254b-drop-exec-perms-bashcompletion.patch - xen: Support setting credit2 scheduler parameters 849052ec-libxl-support-credit2.patch bsc#1162160 - xen: Inhibit libvirtd shutdown when domains are running 6c1dddaf-libxl-shutdown-inhibit.patch bsc#1157100 OBS-URL: https://build.opensuse.org/request/show/769141 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=298
This commit is contained in:
commit
480c229cfe
@ -23,7 +23,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
@@ -5275,6 +5275,96 @@ libxlDomainMemoryStats(virDomainPtr dom,
|
||||
@@ -5280,6 +5280,96 @@ libxlDomainMemoryStats(virDomainPtr dom,
|
||||
|
||||
#undef LIBXL_SET_MEMSTAT
|
||||
|
||||
@ -120,7 +120,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
static int
|
||||
libxlDomainGetJobInfo(virDomainPtr dom,
|
||||
virDomainJobInfoPtr info)
|
||||
@@ -6693,6 +6783,7 @@ static virHypervisorDriver libxlHypervis
|
||||
@@ -6698,6 +6788,7 @@ static virHypervisorDriver libxlHypervis
|
||||
#endif
|
||||
.nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
|
||||
.nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */
|
||||
|
39
6c1dddaf-libxl-shutdown-inhibit.patch
Normal file
39
6c1dddaf-libxl-shutdown-inhibit.patch
Normal file
@ -0,0 +1,39 @@
|
||||
commit 6c1dddaf97b4ef70e27961c9f79b15c79a863ac5
|
||||
Author: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
|
||||
Date: Sat Jan 18 03:37:42 2020 +0100
|
||||
|
||||
libxl: initialize shutdown inhibit callback
|
||||
|
||||
The libxl driver already tries to call shutdown inhibit callback in the
|
||||
right places, but only if it's set. That last part was missing,
|
||||
resulting in premature shutdown when running libvirtd
|
||||
--timeout=...
|
||||
|
||||
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
|
||||
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
|
||||
|
||||
Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
@@ -648,8 +648,8 @@ libxlAddDom0(libxlDriverPrivatePtr drive
|
||||
|
||||
static int
|
||||
libxlStateInitialize(bool privileged,
|
||||
- virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
- void *opaque G_GNUC_UNUSED)
|
||||
+ virStateInhibitCallback callback,
|
||||
+ void *opaque)
|
||||
{
|
||||
libxlDriverConfigPtr cfg;
|
||||
char *driverConf = NULL;
|
||||
@@ -670,6 +670,9 @@ libxlStateInitialize(bool privileged,
|
||||
return VIR_DRV_STATE_INIT_ERROR;
|
||||
}
|
||||
|
||||
+ libxl_driver->inhibitCallback = callback;
|
||||
+ libxl_driver->inhibitOpaque = opaque;
|
||||
+
|
||||
/* Allocate bitmap for vnc port reservation */
|
||||
if (!(libxl_driver->reservedGraphicsPorts =
|
||||
virPortAllocatorRangeNew(_("VNC"),
|
27
72ed254b-drop-exec-perms-bashcompletion.patch
Normal file
27
72ed254b-drop-exec-perms-bashcompletion.patch
Normal file
@ -0,0 +1,27 @@
|
||||
commit 72ed254b38571a2139ed2a43607e07750fea459f
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Thu Jan 30 11:29:41 2020 -0700
|
||||
|
||||
build: Drop execute permissions on virsh bash completion command
|
||||
|
||||
rpmlint complains about "script-without-shebang" due to the execute
|
||||
permissions on /usr/share/bash-completion/completions/vsh. Use
|
||||
INSTALL_DATA instead of INSTALL_SCRIPT to avoid the unnecessary
|
||||
execute permissions.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
|
||||
Index: libvirt-6.0.0/tools/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-6.0.0.orig/tools/Makefile.am
|
||||
+++ libvirt-6.0.0/tools/Makefile.am
|
||||
@@ -357,7 +357,7 @@ libvirt-guests.service: libvirt-guests.s
|
||||
if WITH_BASH_COMPLETION
|
||||
install-bash-completion:
|
||||
$(MKDIR_P) "$(DESTDIR)$(BASH_COMPLETIONS_DIR)"
|
||||
- $(INSTALL_SCRIPT) $(srcdir)/bash-completion/vsh \
|
||||
+ $(INSTALL_DATA) $(srcdir)/bash-completion/vsh \
|
||||
"$(DESTDIR)$(BASH_COMPLETIONS_DIR)/vsh"
|
||||
( cd $(DESTDIR)$(BASH_COMPLETIONS_DIR) && \
|
||||
rm -f virsh virt-admin && \
|
68
849052ec-libxl-support-credit2.patch
Normal file
68
849052ec-libxl-support-credit2.patch
Normal file
@ -0,0 +1,68 @@
|
||||
commit 849052ec61e18780713bec171748e859e32dfd6d
|
||||
Author: Dario Faggioli <dfaggioli@suse.com>
|
||||
Date: Wed Jan 29 12:05:15 2020 +0100
|
||||
|
||||
libxl: support getting and setting parameters for the Credit2
|
||||
|
||||
With Credit2 being Xen default scheduler, it's definitely the case to
|
||||
allow Credit2's scheduling parameters to be get and set via libvirt.
|
||||
|
||||
This is easy, as Credit and Credit2 have (at least as of now) the very
|
||||
same parameters ('weight' and 'cap'). So we can just let credit2 pass
|
||||
the scheduler-type check and the same code will work for both.
|
||||
|
||||
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
|
||||
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
|
||||
|
||||
Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
@@ -73,7 +73,7 @@ VIR_LOG_INIT("libxl.libxl_driver");
|
||||
#define HYPERVISOR_CAPABILITIES "/proc/xen/capabilities"
|
||||
#define HYPERVISOR_XENSTORED "/dev/xen/xenstored"
|
||||
|
||||
-/* Number of Xen scheduler parameters */
|
||||
+/* Number of Xen scheduler parameters. credit and credit2 both support 2 */
|
||||
#define XEN_SCHED_CREDIT_NPARAM 2
|
||||
|
||||
#define LIBXL_CHECK_DOM0_GOTO(name, label) \
|
||||
@@ -4579,6 +4579,8 @@ libxlDomainGetSchedulerType(virDomainPtr
|
||||
break;
|
||||
case LIBXL_SCHEDULER_CREDIT2:
|
||||
name = "credit2";
|
||||
+ if (nparams)
|
||||
+ *nparams = XEN_SCHED_CREDIT_NPARAM;
|
||||
break;
|
||||
case LIBXL_SCHEDULER_ARINC653:
|
||||
name = "arinc653";
|
||||
@@ -4625,11 +4627,11 @@ libxlDomainGetSchedulerParametersFlags(v
|
||||
if (virDomainObjCheckActive(vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
+ /* Only credit and credit2 are supported for now. */
|
||||
sched_id = libxl_get_scheduler(cfg->ctx);
|
||||
-
|
||||
- if (sched_id != LIBXL_SCHEDULER_CREDIT) {
|
||||
+ if (sched_id != LIBXL_SCHEDULER_CREDIT && sched_id != LIBXL_SCHEDULER_CREDIT2) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("Only 'credit' scheduler is supported"));
|
||||
+ _("Only 'credit' and 'credit2' schedulers are supported"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -4702,11 +4704,11 @@ libxlDomainSetSchedulerParametersFlags(v
|
||||
if (virDomainObjCheckActive(vm) < 0)
|
||||
goto endjob;
|
||||
|
||||
+ /* Only credit and credit2 are supported for now. */
|
||||
sched_id = libxl_get_scheduler(cfg->ctx);
|
||||
-
|
||||
- if (sched_id != LIBXL_SCHEDULER_CREDIT) {
|
||||
+ if (sched_id != LIBXL_SCHEDULER_CREDIT && sched_id != LIBXL_SCHEDULER_CREDIT2) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("Only 'credit' scheduler is supported"));
|
||||
+ _("Only 'credit' and 'credit2' schedulers are supported"));
|
||||
goto endjob;
|
||||
}
|
||||
|
@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 30 22:05:24 UTC 2020 - James Fehlig <jfehlig@suse.com>
|
||||
|
||||
- spec: Fix several rpmlint warnings
|
||||
72ed254b-drop-exec-perms-bashcompletion.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 30 00:45:39 UTC 2020 - James Fehlig <jfehlig@suse.com>
|
||||
|
||||
- xen: Support setting credit2 scheduler parameters
|
||||
849052ec-libxl-support-credit2.patch
|
||||
bsc#1162160
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 29 20:56:13 UTC 2020 - James Fehlig <jfehlig@suse.com>
|
||||
|
||||
- xen: Inhibit libvirtd shutdown when domains are running
|
||||
6c1dddaf-libxl-shutdown-inhibit.patch
|
||||
bsc#1157100
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 15 19:27:10 UTC 2020 - James Fehlig <jfehlig@suse.com>
|
||||
|
||||
|
29
libvirt.spec
29
libvirt.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libvirt
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -338,6 +338,9 @@ Source6: libvirtd-relocation-server.xml
|
||||
Source99: baselibs.conf
|
||||
Source100: %{name}-rpmlintrc
|
||||
# Upstream patches
|
||||
Patch0: 6c1dddaf-libxl-shutdown-inhibit.patch
|
||||
Patch1: 849052ec-libxl-support-credit2.patch
|
||||
Patch2: 72ed254b-drop-exec-perms-bashcompletion.patch
|
||||
# Patches pending upstream review
|
||||
Patch100: libxl-dom-reset.patch
|
||||
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
|
||||
@ -415,8 +418,7 @@ Requires: numad
|
||||
# libvirtd depends on 'messagebus' service
|
||||
Requires: dbus-1
|
||||
|
||||
# libvirt is configured with paths to UEFI firmwares in %build,
|
||||
# hence add a dependency to the firmware packages
|
||||
# A KVM or Xen libvirt stack really does need UEFI firmware these days
|
||||
%ifarch x86_64
|
||||
Requires: qemu-ovmf-x86_64
|
||||
%endif
|
||||
@ -833,7 +835,7 @@ Bash completion script stub.
|
||||
%package devel
|
||||
Summary: Libraries, includes, etc. to compile with the libvirt library
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{name}-client = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Suggests: %{name}-doc = %{version}-%{release}
|
||||
Requires: pkg-config
|
||||
|
||||
@ -871,6 +873,9 @@ libvirt plugin for NSS for translating domain names into IP addresses.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch150 -p1
|
||||
@ -1240,7 +1245,7 @@ fi
|
||||
|
||||
%pre daemon
|
||||
%{_bindir}/getent group libvirt >/dev/null || %{_sbindir}/groupadd -r libvirt
|
||||
%service_add_pre libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket
|
||||
%service_add_pre libvirtd.service libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket virtproxyd.service virtproxyd.socket virtproxyd-ro.socket virtproxyd-admin.socket virtproxyd-tcp.socket virtproxyd-tls.socket virt-guest-shutdown.target
|
||||
|
||||
%post daemon
|
||||
/sbin/ldconfig
|
||||
@ -1250,7 +1255,7 @@ fi
|
||||
%if %{with_firewalld}
|
||||
%firewalld_reload
|
||||
%endif
|
||||
%service_add_post libvirtd.service libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket virtproxyd.service virtproxyd.socket virtproxyd-ro.socket virtproxyd-admin.socket virtproxyd-tcp.socket virtproxyd-tls.socket
|
||||
%service_add_post libvirtd.service libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket virtproxyd.service virtproxyd.socket virtproxyd-ro.socket virtproxyd-admin.socket virtproxyd-tcp.socket virtproxyd-tls.socket virt-guest-shutdown.target
|
||||
%{fillup_only -n libvirtd}
|
||||
%{fillup_only -n virtlockd}
|
||||
%{fillup_only -n virtlogd}
|
||||
@ -1264,7 +1269,7 @@ if ! grep -q -E '^\s*LIBVIRTD_ARGS=.*--timeout' %{_sysconfdir}/sysconfig/libvirt
|
||||
fi
|
||||
|
||||
%preun daemon
|
||||
%service_del_preun libvirtd.service libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket
|
||||
%service_del_preun libvirtd.service libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket virtproxyd.service virtproxyd.socket virtproxyd-ro.socket virtproxyd-admin.socket virtproxyd-tcp.socket virtproxyd-tls.socket virt-guest-shutdown.target
|
||||
|
||||
%postun daemon
|
||||
/sbin/ldconfig
|
||||
@ -1275,7 +1280,7 @@ if test $1 -eq 0 ; then
|
||||
done
|
||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
%service_del_postun libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket
|
||||
%service_del_postun libvirtd.service libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket virtproxyd.service virtproxyd.socket virtproxyd-ro.socket virtproxyd-admin.socket virtproxyd-tcp.socket virtproxyd-tls.socket virt-guest-shutdown.target
|
||||
|
||||
%posttrans daemon
|
||||
# All connection drivers should be installed post transaction.
|
||||
@ -1339,17 +1344,17 @@ fi
|
||||
%postun daemon-driver-nwfilter
|
||||
%service_del_postun virtnwfilterd.service virtnwfilterd.socket virtnwfilterd-ro.socket virtnwfilterd-admin.socket
|
||||
|
||||
%pre daemon-driver-storage
|
||||
%pre daemon-driver-storage-core
|
||||
%service_add_pre virtstoraged.service virtstoraged.socket virtstoraged-ro.socket virtstoraged-admin.socket
|
||||
|
||||
%post daemon-driver-storage
|
||||
%post daemon-driver-storage-core
|
||||
%service_add_post virtstoraged.service virtstoraged.socket virtstoraged-ro.socket virtstoraged-admin.socket
|
||||
%{fillup_only -n virtstoraged}
|
||||
|
||||
%preun daemon-driver-storage
|
||||
%preun daemon-driver-storage-core
|
||||
%service_del_preun virtstoraged.service virtstoraged.socket virtstoraged-ro.socket virtstoraged-admin.socket
|
||||
|
||||
%postun daemon-driver-storage
|
||||
%postun daemon-driver-storage-core
|
||||
%service_del_postun virtstoraged.service virtstoraged.socket virtstoraged-ro.socket virtstoraged-admin.socket
|
||||
|
||||
%pre daemon-driver-interface
|
||||
|
@ -12,7 +12,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
@@ -1361,6 +1361,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
|
||||
@@ -1364,6 +1364,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
|
||||
}
|
||||
|
||||
static int
|
||||
@ -74,7 +74,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
libxlDomainDestroyFlags(virDomainPtr dom,
|
||||
unsigned int flags)
|
||||
{
|
||||
@@ -6568,6 +6623,7 @@ static virHypervisorDriver libxlHypervis
|
||||
@@ -6573,6 +6628,7 @@ static virHypervisorDriver libxlHypervis
|
||||
.domainShutdown = libxlDomainShutdown, /* 0.9.0 */
|
||||
.domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
|
||||
.domainReboot = libxlDomainReboot, /* 0.9.0 */
|
||||
|
@ -56,7 +56,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
@@ -6133,6 +6133,9 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
@@ -6138,6 +6138,9 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
const char *dname = NULL;
|
||||
const char *uri = NULL;
|
||||
int ret = -1;
|
||||
@ -66,7 +66,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
|
||||
#ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
|
||||
virReportUnsupportedError();
|
||||
@@ -6149,6 +6152,18 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
@@ -6154,6 +6157,18 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
virTypedParamsGetString(params, nparams,
|
||||
VIR_MIGRATE_PARAM_DEST_NAME,
|
||||
&dname) < 0 ||
|
||||
@ -85,7 +85,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c
|
||||
virTypedParamsGetString(params, nparams,
|
||||
VIR_MIGRATE_PARAM_URI,
|
||||
&uri) < 0)
|
||||
@@ -6163,11 +6178,11 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
@@ -6168,11 +6183,11 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
|
||||
if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) {
|
||||
if (libxlDomainMigrationSrcPerformP2P(driver, vm, dom->conn, dom_xml,
|
||||
|
Loading…
x
Reference in New Issue
Block a user