import libvirt-7.9.0-1.el9

This commit is contained in:
CentOS Sources 2021-12-07 12:32:32 -05:00 committed by Stepan Oksanichenko
parent 95387c4e8a
commit 3bd4fe799f
6 changed files with 249 additions and 300 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libvirt-7.6.0.tar.xz
SOURCES/libvirt-7.9.0.tar.xz

View File

@ -1 +1 @@
d80c78e465ed9af0c745141e323fa312656e8ff6 SOURCES/libvirt-7.6.0.tar.xz
dcf9c3c8404e2a91c93538db9a57c9356abb927d SOURCES/libvirt-7.9.0.tar.xz

View File

@ -1,253 +0,0 @@
From 8eaad4cc89e78c25ccca3481741cded0538046b0 Mon Sep 17 00:00:00 2001
Message-Id: <8eaad4cc89e78c25ccca3481741cded0538046b0@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Wed, 28 Jul 2021 17:37:21 +0200
Subject: [PATCH] RHEL: Enable usage of x-blockdev-reopen
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RHEL-only
Introduce a new capability QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API
based on the presence of '__com.redhat_rhel-av-8_2_0-api' feature for
'x-blockdev-reopen' which states that reopen works for what libvirt
is going to use it and wire up code to call the x- prefixed command.
This implementation will become dormant once qemu starts supporting
upstream-stable blockdev-reopen.
https://bugzilla.redhat.com/show_bug.cgi?id=1799013
Starting with libvirt-7.6, upstream has adapted to the new format of
arguments so this patch was modified to support blockdev-reopen which
takes an array of nodes to reopen.
https://bugzilla.redhat.com/show_bug.cgi?id=1929765
Message-Id: <3fcde2fc6add36d5276ae224caf18adc8bca7d48.1627486352.git.pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
src/qemu/qemu_block.c | 24 +++++++++++++++---------
src/qemu/qemu_block.h | 3 ++-
src/qemu/qemu_capabilities.c | 11 +++++++++++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_monitor.c | 5 +++--
src/qemu/qemu_monitor.h | 3 ++-
src/qemu/qemu_monitor_json.c | 12 +++++++++---
src/qemu/qemu_monitor_json.h | 3 ++-
tests/qemumonitorjsontest.c | 2 +-
9 files changed, 46 insertions(+), 18 deletions(-)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 4691dff4f7..1f731fff3d 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -3289,7 +3289,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc,
int
qemuBlockReopenFormatMon(qemuMonitor *mon,
- virStorageSource *src)
+ virStorageSource *src,
+ bool downstream)
{
g_autoptr(virJSONValue) reopenprops = NULL;
g_autoptr(virJSONValue) srcprops = NULL;
@@ -3298,15 +3299,19 @@ qemuBlockReopenFormatMon(qemuMonitor *mon,
if (!(srcprops = qemuBlockStorageSourceGetBlockdevProps(src, src->backingStore)))
return -1;
- if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0)
- return -1;
+ if (downstream) {
+ reopenprops = g_steal_pointer(&srcprops);
+ } else {
+ if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0)
+ return -1;
- if (virJSONValueObjectCreate(&reopenprops,
- "a:options", &reopenoptions,
- NULL) < 0)
- return -1;
+ if (virJSONValueObjectCreate(&reopenprops,
+ "a:options", &reopenoptions,
+ NULL) < 0)
+ return -1;
+ }
- if (qemuMonitorBlockdevReopen(mon, &reopenprops) < 0)
+ if (qemuMonitorBlockdevReopen(mon, &reopenprops, downstream) < 0)
return -1;
return 0;
@@ -3330,6 +3335,7 @@ qemuBlockReopenFormat(virDomainObj *vm,
{
qemuDomainObjPrivate *priv = vm->privateData;
virQEMUDriver *driver = priv->driver;
+ bool downstream = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API);
int rc;
/* If we are lacking the object here, qemu might have opened an image with
@@ -3343,7 +3349,7 @@ qemuBlockReopenFormat(virDomainObj *vm,
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
return -1;
- rc = qemuBlockReopenFormatMon(priv->mon, src);
+ rc = qemuBlockReopenFormatMon(priv->mon, src, downstream);
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
return -1;
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index 54601a48a9..88fc9974c4 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -268,7 +268,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc,
/* only for use in qemumonitorjsontest */
int
qemuBlockReopenFormatMon(qemuMonitor *mon,
- virStorageSource *src);
+ virStorageSource *src,
+ bool downstream);
int
qemuBlockReopenReadWrite(virDomainObj *vm,
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 9558938866..6734ed213d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -637,6 +637,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"confidential-guest-support",
"query-display-options",
"s390-pv-guest",
+ "blockdev-reopen.__com.redhat_rhel-av-8_2_0-api",
);
@@ -1551,6 +1552,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVhostUserFS[] =
/* see documentation for virQEMUQAPISchemaPathGet for the query format */
static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
+ { "x-blockdev-reopen/$__com.redhat_rhel-av-8_2_0-api", QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API },
{ "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
{ "blockdev-add/arg-type/+gluster/debug", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
{ "blockdev-add/arg-type/+vxhs", QEMU_CAPS_VXHS},
@@ -5204,6 +5206,15 @@ virQEMUCapsInitProcessCaps(virQEMUCaps *qemuCaps)
qemuCaps->arch == VIR_ARCH_MIPS)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_SCSI_NCR53C90);
+ /* RHEL-only:
+ * - if upstream blockdev-reopen is enabled, clear the downstream flag
+ * - if the downstream flag is present but not the upstream, assert the upstream flag too
+ */
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
+ virQEMUCapsClear(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API);
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API))
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN);
+
virQEMUCapsInitProcessCapsInterlock(qemuCaps);
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 2b1bb57a49..def0dd2030 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -617,6 +617,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT, /* -machine confidential-guest-support */
QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp command present */
QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */
+ QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API, /* downstream support for blockdev reopen in rhel-av-8.2.0 */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 6e2d8010c5..7ebaa7b099 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -4339,14 +4339,15 @@ qemuMonitorBlockdevAdd(qemuMonitor *mon,
int
qemuMonitorBlockdevReopen(qemuMonitor *mon,
- virJSONValue **props)
+ virJSONValue **props,
+ bool downstream)
{
VIR_DEBUG("props=%p (node-name=%s)", *props,
NULLSTR(virJSONValueObjectGetString(*props, "node-name")));
QEMU_CHECK_MONITOR(mon);
- return qemuMonitorJSONBlockdevReopen(mon, props);
+ return qemuMonitorJSONBlockdevReopen(mon, props, downstream);
}
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 1491c1297c..5a93447e23 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -1366,7 +1366,8 @@ int qemuMonitorBlockdevAdd(qemuMonitor *mon,
virJSONValue **props);
int qemuMonitorBlockdevReopen(qemuMonitor *mon,
- virJSONValue **props);
+ virJSONValue **props,
+ bool downstream);
int qemuMonitorBlockdevDel(qemuMonitor *mon,
const char *nodename);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index ca2c3bb6cf..8ecd5f3bbd 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -8687,13 +8687,19 @@ qemuMonitorJSONBlockdevAdd(qemuMonitor *mon,
int
qemuMonitorJSONBlockdevReopen(qemuMonitor *mon,
- virJSONValue **props)
+ virJSONValue **props,
+ bool downstream)
{
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
- if (!(cmd = qemuMonitorJSONMakeCommandInternal("blockdev-reopen", props)))
- return -1;
+ if (downstream) {
+ if (!(cmd = qemuMonitorJSONMakeCommandInternal("x-blockdev-reopen", props)))
+ return -1;
+ } else {
+ if (!(cmd = qemuMonitorJSONMakeCommandInternal("blockdev-reopen", props)))
+ return -1;
+ }
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
return -1;
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 01a3ba25f1..90792c9939 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -601,7 +601,8 @@ int qemuMonitorJSONBlockdevAdd(qemuMonitor *mon,
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int qemuMonitorJSONBlockdevReopen(qemuMonitor *mon,
- virJSONValue **props)
+ virJSONValue **props,
+ bool downstream)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int qemuMonitorJSONBlockdevDel(qemuMonitor *mon,
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 2122d9d999..c20287afee 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2820,7 +2820,7 @@ testQemuMonitorJSONBlockdevReopen(const void *opaque)
if (qemuMonitorTestAddItem(test, "blockdev-reopen", "{\"return\":{}}") < 0)
return -1;
- if (qemuBlockReopenFormatMon(qemuMonitorTestGetMonitor(test), src) < 0)
+ if (qemuBlockReopenFormatMon(qemuMonitorTestGetMonitor(test), src, false) < 0)
return -1;
return 0;
--
2.32.0

View File

@ -1,5 +1,5 @@
From 8232ba78dea7336282f65e94d575beb9b27d03f4 Mon Sep 17 00:00:00 2001
Message-Id: <8232ba78dea7336282f65e94d575beb9b27d03f4@dist-git>
From 48c3540f12f4c14fc8f84de08603f3bf6ccfbd70 Mon Sep 17 00:00:00 2001
Message-Id: <48c3540f12f4c14fc8f84de08603f3bf6ccfbd70@dist-git>
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Mon, 27 Aug 2018 13:09:38 +0200
Subject: [PATCH] RHEL: Fix virConnectGetMaxVcpus output
@ -26,7 +26,7 @@ Reviewed-by: Andrea Bolognani <abologna@redhat.com>
1 file changed, 5 insertions(+)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 7aa92ad11d..337f03b41b 100644
index 5dd2baf2df..6811c498f9 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -1192,6 +1192,11 @@ virHostCPUGetKVMMaxVCPUs(void)
@ -42,5 +42,5 @@ index 7aa92ad11d..337f03b41b 100644
/* at first try KVM_CAP_MAX_VCPUS to determine the maximum count */
if ((ret = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_MAX_VCPUS)) > 0)
--
2.32.0
2.33.1

View File

@ -32,6 +32,7 @@ tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_pf_vfs_all.xml ../nodedevschemada
tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_pf_vfs_all_header_type.xml ../nodedevschemadata/pci_0000_02_10_7_sriov_pf_vfs_all_header_type.xml
tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_vfs.xml ../nodedevschemadata/pci_0000_02_10_7_sriov_vfs.xml
tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_zero_vfs_max_count.xml ../nodedevschemadata/pci_0000_02_10_7_sriov_zero_vfs_max_count.xml
tests/nodedevxml2xmlout/pci_0000_42_00_0_vpd.xml ../nodedevschemadata/pci_0000_42_00_0_vpd.xml
tests/nodedevxml2xmlout/pci_1002_71c4.xml ../nodedevschemadata/pci_1002_71c4.xml
tests/nodedevxml2xmlout/pci_8086_0c0c_snd_hda_intel.xml ../nodedevschemadata/pci_8086_0c0c_snd_hda_intel.xml
tests/nodedevxml2xmlout/pci_8086_10c9_sriov_pf.xml ../nodedevschemadata/pci_8086_10c9_sriov_pf.xml
@ -49,6 +50,7 @@ tests/nodedevxml2xmlout/usb_device_1d6b_1_0000_00_1d_0.xml ../nodedevschemadata/
tests/nodedevxml2xmlout/usb_device_1d6b_1_0000_00_1d_0_if0.xml ../nodedevschemadata/usb_device_1d6b_1_0000_00_1d_0_if0.xml
tests/qemublocktestdata/imagecreate/qcow2-backing-luks.xml qcow2.xml
tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2-slice.xml qcow2.xml
tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2luks.xml qcow2.xml
tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.xml qcow2.xml
tests/qemublocktestdata/imagecreate/qcow2-backing-raw-slice.xml qcow2.xml
tests/qemublocktestdata/imagecreate/qcow2-backing-raw.xml qcow2.xml
@ -154,7 +156,7 @@ tests/qemuxml2xmloutdata/clock-realtime.xml ../qemuxml2argvdata/clock-realtime.x
tests/qemuxml2xmloutdata/clock-timer-armvtimer.aarch64-latest.xml ../qemuxml2argvdata/clock-timer-armvtimer.xml
tests/qemuxml2xmloutdata/disk-detect-zeroes.x86_64-latest.xml ../qemuxml2argvdata/disk-detect-zeroes.xml
tests/qemuxml2xmloutdata/disk-nvme.xml ../qemuxml2argvdata/disk-nvme.xml
tests/qemuxml2xmloutdata/disk-virtio-queues.xml ../qemuxml2argvdata/disk-virtio-queues.xml
tests/qemuxml2xmloutdata/disk-virtio-queues.x86_64-latest.xml ../qemuxml2argvdata/disk-virtio-queues.xml
tests/qemuxml2xmloutdata/disk-virtio-scsi-reservations.xml ../qemuxml2argvdata/disk-virtio-scsi-reservations.xml
tests/qemuxml2xmloutdata/downscript.xml ../qemuxml2argvdata/downscript.xml
tests/qemuxml2xmloutdata/encrypted-disk-usage.xml ../qemuxml2argvdata/encrypted-disk-usage.xml
@ -187,6 +189,7 @@ tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-pmem.xml ../qemuxml2argvdata/memo
tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-readonly.xml ../qemuxml2argvdata/memory-hotplug-nvdimm-readonly.xml
tests/qemuxml2xmloutdata/memory-hotplug-nvdimm.xml ../qemuxml2argvdata/memory-hotplug-nvdimm.xml
tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml ../qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml
tests/qemuxml2xmloutdata/memory-hotplug-virtio-mem.x86_64-latest.xml ../qemuxml2argvdata/memory-hotplug-virtio-mem.xml
tests/qemuxml2xmloutdata/memory-hotplug-virtio-pmem.x86_64-latest.xml ../qemuxml2argvdata/memory-hotplug-virtio-pmem.xml
tests/qemuxml2xmloutdata/net-user-addr.xml ../qemuxml2argvdata/net-user-addr.xml
tests/qemuxml2xmloutdata/net-virtio-teaming-hostdev.xml ../qemuxml2argvdata/net-virtio-teaming-hostdev.xml
@ -197,6 +200,8 @@ tests/qemuxml2xmloutdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.xml ../q
tests/qemuxml2xmloutdata/pages-dimm-discard.xml ../qemuxml2argvdata/pages-dimm-discard.xml
tests/qemuxml2xmloutdata/pages-discard-hugepages.xml ../qemuxml2argvdata/pages-discard-hugepages.xml
tests/qemuxml2xmloutdata/pages-discard.xml ../qemuxml2argvdata/pages-discard.xml
tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml ../qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.xml
tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml ../qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.xml
tests/qemuxml2xmloutdata/pseries-console-native.xml pseries-serial-native.xml
tests/qemuxml2xmloutdata/pseries-serial+console-native.xml pseries-serial-native.xml
tests/qemuxml2xmloutdata/pseries-serial-compat.xml pseries-serial-native.xml
@ -1096,3 +1101,12 @@ tests/virhostcpudata/linux-with-die/node/node0/cpu6 ../../cpu/cpu6
tests/virhostcpudata/linux-with-die/node/node0/cpu7 ../../cpu/cpu7
tests/virhostcpudata/linux-with-die/node/node0/cpu8 ../../cpu/cpu8
tests/virhostcpudata/linux-with-die/node/node0/cpu9 ../../cpu/cpu9
tests/virstoragetestdata/images/sub/link1 ../qcow2_raw-raw-reldir.qcow2
tests/virstoragetestdata/images/sub/link2 ../qcow2_qcow2-qcow2-symlink_raw-raw-reldir.qcow2
tests/virstoragetestdata/lookup/sub/link2 ../wrap
tests/vmx2xmldata/cdrom-ide-file-missing-datastore.xml cdrom-ide-empty.xml
tests/vmx2xmldata/cdrom-ide-file-missing-file.xml cdrom-ide-empty.xml
tests/vmx2xmldata/serial-pipe-client-app.xml serial-pipe.xml
tests/vmx2xmldata/serial-pipe-client-vm.xml serial-pipe.xml
tests/vmx2xmldata/serial-pipe-server-app.xml serial-pipe.xml
tests/vmx2xmldata/serial-pipe-server-vm.xml serial-pipe.xml

View File

@ -24,7 +24,7 @@
%define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit}
%define arches_zfs %{arches_x86} %{power64} %{arm}
%define arches_numactl %{arches_x86} %{power64} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64
# The hypervisor drivers that run in libvirtd
@ -181,6 +181,11 @@
%define with_dmidecode 0%{!?_without_dmidecode:1}
%endif
%define with_modular_daemons 0
%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
%define with_modular_daemons 1
%endif
# Force QEMU to run as non-root
%define qemu_user qemu
%define qemu_group qemu
@ -200,8 +205,8 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 7.6.0
Release: 2%{?dist}%{?extra_release}
Version: 7.9.0
Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
URL: https://libvirt.org/
@ -212,7 +217,6 @@ Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
Source1: symlinks
Patch1: libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
Patch2: libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
@ -1097,6 +1101,12 @@ exit 1
%define arg_libssh2 -Dlibssh2=disabled
%endif
%if %{with_modular_daemons}
%define arg_remote_mode -Dremote_default_mode=direct
%else
%define arg_remote_mode -Dremote_default_mode=legacy
%endif
%define when %(date +"%%F-%%T")
%define where %(hostname)
%define who %{?packager}%{!?packager:Unknown}
@ -1127,7 +1137,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
-Ddriver_vz=disabled \
-Ddriver_bhyve=disabled \
-Ddriver_ch=disabled \
-Dremote_default_mode=legacy \
%{?arg_remote_mode} \
-Ddriver_interface=enabled \
-Ddriver_network=enabled \
-Dstorage_fs=enabled \
@ -1269,6 +1279,29 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
# raising the test timeout
VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10
%define libvirt_daemon_schedule_restart() mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : \
/bin/systemctl is-active %1.service 1>/dev/null 2>&1 && \
touch %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 || :
%define libvirt_daemon_finish_restart() rm -f %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 \
rmdir %{_localstatedir}/lib/rpm-state/libvirt 2>/dev/null || :
%define libvirt_daemon_needs_restart() -f %{_localstatedir}/lib/rpm-state/libvirt/restart-%1
%define libvirt_daemon_perform_restart() if test %libvirt_daemon_needs_restart %1 \
then \
/bin/systemctl try-restart %1.service >/dev/null 2>&1 || : \
fi \
%libvirt_daemon_finish_restart %1
%define libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1.service
%define libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service
%define libvirt_daemon_systemd_preun() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1.socket
%define libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.socket
%pre daemon
# 'libvirt' group is just to allow password-less polkit access to
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
@ -1278,30 +1311,25 @@ getent group libvirt >/dev/null || groupadd -r libvirt
exit 0
%post daemon
%global post_units \\\
virtlockd.socket virtlockd-admin.socket \\\
virtlogd.socket virtlogd-admin.socket \\\
libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket \\\
libvirtd-tcp.socket libvirtd-tls.socket \\\
libvirtd.service \\\
libvirt-guests.service
%libvirt_daemon_systemd_post virtlogd
%libvirt_daemon_systemd_post virtlockdd
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post_inet virtproxyd
%else
%libvirt_daemon_systemd_post_inet libvirtd
%endif
%systemd_post %post_units
%systemd_post libvirt-guests.service
# request daemon restart in posttrans
mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
%libvirt_daemon_schedule_restart libvirtd
%preun daemon
%global preun_units \\\
libvirtd.service \\\
libvirtd-tcp.socket libvirtd-tls.socket \\\
libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket \\\
virtlogd.socket virtlogd-admin.socket virtlogd.service \\\
virtlockd.socket virtlockd-admin.socket virtlockd.service \\\
libvirt-guests.service
%systemd_preun libvirt-guests.service
%systemd_preun %preun_units
%libvirt_daemon_systemd_preun_inet libvirtd
%libvirt_daemon_systemd_preun_inet virtproxyd
%libvirt_daemon_systemd_preun virtlogd
%libvirt_daemon_systemd_preun virtlockdd
%postun daemon
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
@ -1323,7 +1351,8 @@ if [ $1 -ge 1 ] ; then
fi
%posttrans daemon
if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
if test %libvirt_daemon_needs_restart libvirtd
then
# See if user has previously modified their install to
# tell libvirtd to use --listen
grep -E '^LIBVIRTD_ARGS=.*--listen' /etc/sysconfig/libvirtd 1>/dev/null 2>&1
@ -1359,18 +1388,156 @@ if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
fi
fi
fi
rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
%libvirt_daemon_finish_restart libvirtd
%post daemon-driver-network
%if %{with_firewalld_zone}
%firewalld_reload
%endif
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtnetworkd
%endif
%libvirt_daemon_schedule_restart virtnetworkd
%preun
%libvirt_daemon_systemd_preun virtnetworkd
%postun daemon-driver-network
%if %{with_firewalld_zone}
%firewalld_reload
%endif
%posttrans daemon-driver-network
%libvirt_daemon_perform_restart virtnetworkd
%post daemon-driver-nwfilter
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtnwfilterd
%endif
%libvirt_daemon_schedule_restart virtnwfilterd
%preun daemon-driver-nwfilter
%libvirt_daemon_systemd_preun virtnwfilterd
%posttrans daemon-driver-nwfilter
%libvirt_daemon_perform_restart virtnwfilterd
%post daemon-driver-nodedev
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtnodedevd
%endif
%libvirt_daemon_schedule_restart virtnodedevd
%preun daemon-driver-nodedev
%libvirt_daemon_systemd_preun virtnodedevd
%posttrans daemon-driver-nodedev
%libvirt_daemon_perform_restart virtnodedevd
%post daemon-driver-interface
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtinterfaced
%endif
%libvirt_daemon_schedule_restart virtinterfaced
%preun daemon-driver-interface
%libvirt_daemon_systemd_preun virtinterfaced
%posttrans daemon-driver-interface
%libvirt_daemon_perform_restart virtinterfaced
%post daemon-driver-secret
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtsecretd
%endif
%libvirt_daemon_schedule_restart virtsecretd
%preun daemon-driver-secret
%libvirt_daemon_systemd_preun virtsecretd
%posttrans daemon-driver-secret
%libvirt_daemon_perform_restart virtsecretd
%post daemon-driver-storage
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtstoraged
%endif
%libvirt_daemon_schedule_restart virtstoraged
%preun daemon-driver-storage
%libvirt_daemon_systemd_preun virtstoraged
%posttrans daemon-driver-storage
%libvirt_daemon_perform_restart virtstoraged
%if %{with_qemu}
%post daemon-driver-qemu
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtqemud
%endif
%libvirt_daemon_schedule_restart virtqemud
%preun daemon-driver-qemu
%libvirt_daemon_systemd_preun virtqemud
%posttrans daemon-driver-qemu
%libvirt_daemon_perform_restart virtqemud
%endif
%if %{with_lxc}
%post daemon-driver-lxc
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtlxcd
%endif
%libvirt_daemon_schedule_restart virtlxcd
%preun daemon-driver-lxc
%libvirt_daemon_systemd_preun virtlxcd
%posttrans daemon-driver-lxc
%libvirt_daemon_perform_restart virtlxcd
%endif
%if %{with_vbox}
%post daemon-driver-vbox
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtvboxd
%endif
%libvirt_daemon_schedule_restart virtvboxd
%preun daemon-driver-vbox
%libvirt_daemon_systemd_preun virtvboxd
%posttrans daemon-driver-vbox
%libvirt_daemon_perform_restart virtvboxd
%endif
%if %{with_libxl}
%post daemon-driver-libxl
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtxend
%endif
%libvirt_daemon_schedule_restart virtxend
%preun daemon-driver-libxl
%libvirt_daemon_systemd_preun virtxend
%posttrans daemon-driver-libxl
%libvirt_daemon_perform_restart virtxend
%endif
%post daemon-config-network
if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
# see if the network used by default network creates a conflict,
@ -1409,15 +1576,13 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml
# Make sure libvirt picks up the new network defininiton
mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
%libvirt_daemon_schedule_restart libvirtd
%libvirt_daemon_schedule_restart virtnetworkd
fi
%posttrans daemon-config-network
if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
fi
rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
%libvirt_daemon_perform_restart libvirtd
%libvirt_daemon_perform_restart virtnetworkd
%post daemon-config-nwfilter
for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do
@ -1428,15 +1593,12 @@ for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do
fi
done
# Make sure libvirt picks up the new nwfilter defininitons
mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
%libvirt_daemon_schedule_restart libvirtd
%libvirt_daemon_schedule_restart virtnwfilterd
%posttrans daemon-config-nwfilter
if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
fi
rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
%libvirt_daemon_perform_restart libvirtd
%libvirt_daemon_perform_restart virtnwfilterd
%if %{with_qemu}
%pre daemon-driver-qemu
@ -1726,7 +1888,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%ghost %dir %{_rundir}/libvirt/qemu/
%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%dir %attr(0750, root, root) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
@ -1923,6 +2085,32 @@ exit 0
%changelog
* Fri Nov 5 2021 Jiri Denemark <jdenemar@redhat.com> - 7.9.0-1
- Rebased to libvirt-7.9.0 (rhbz#2001507)
- The rebase also fixes the following bugs:
rhbz#2007659, rhbz#2014487, rhbz#1806856, rhbz#2014139, rhbz#1964223
rhbz#2007168, rhbz#2012386, rhbz#2013573, rhbz#1897708
* Tue Oct 5 2021 Jiri Denemark <jdenemar@redhat.com> - 7.8.0-1
- Rebased to libvirt-7.8.0 (rhbz#2001507)
- The rebase also fixes the following bugs:
rhbz#1999420, rhbz#2002761, rhbz#1998920, rhbz#1986066, rhbz#1822891
rhbz#2001627, rhbz#1819160, rhbz#2000861, rhbz#2003092
* Wed Sep 22 2021 Jiri Denemark <jdenemar@redhat.com> - 7.7.0-3
- virshDomainGetVcpuBitmap: Return bitmap when taking the fallback path (rhbz#2004429)
* Tue Sep 21 2021 Jiri Denemark <jdenemar@redhat.com> - 7.7.0-2
- Update gating.yaml by adding subject_type
- Revert "RHEL: spec: Do not enable modular daemons yet" (rhbz#1920012)
* Fri Sep 10 2021 Jiri Denemark <jdenemar@redhat.com> - 7.7.0-1
- Rebased to libvirt-7.7.0 (rhbz#2001507)
- The rebase also fixes the following bugs:
rhbz#2001326, rhbz#2001391, rhbz#2001322, rhbz#2001389, rhbz#1967187
rhbz#2001327, rhbz#1977155, rhbz#2001997, rhbz#2001323
- RHEL: spec: Do not enable modular daemons yet (rhbz#2001507)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 7.6.0-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688