forked from rpms/libvirt
Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/libvirt.git#91d8eff5695e2bbf769295083dcea17fd9d1bc41
This commit is contained in:
parent
1e0bcdcdf3
commit
c7371f4737
@ -1,90 +0,0 @@
|
||||
From 48622bb5637587a1cc24f7fdc8ab32cd89798a9d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <48622bb5637587a1cc24f7fdc8ab32cd89798a9d.1601670767.git.crobinso@redhat.com>
|
||||
From: Pavel Hrdina <phrdina@redhat.com>
|
||||
Date: Fri, 2 Oct 2020 12:11:45 +0200
|
||||
Subject: [PATCH] tests: fix incorrect free of GVariant in our GLib mock
|
||||
functions
|
||||
|
||||
GLib implementation of g_dbus_connection_call_sync() calls
|
||||
g_variant_ref_sink() on the passed @parameters to make sure they have
|
||||
proper reference. If the original reference is floating the
|
||||
g_dbus_connection_call_sync() consumes it, but if it's normal reference
|
||||
it will just add another one.
|
||||
|
||||
Our mock functions were only freeing the @parameters which is incorrect
|
||||
and doesn't reflect how the real implementation works.
|
||||
|
||||
Reported-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
---
|
||||
tests/networkxml2firewalltest.c | 4 +++-
|
||||
tests/virfirewalltest.c | 3 +++
|
||||
tests/virpolkittest.c | 3 +++
|
||||
tests/virsystemdtest.c | 4 +++-
|
||||
4 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c
|
||||
index e0244f508e..3496445f0d 100644
|
||||
--- a/tests/networkxml2firewalltest.c
|
||||
+++ b/tests/networkxml2firewalltest.c
|
||||
@@ -60,8 +60,10 @@ VIR_MOCK_WRAP_RET_ARGS(g_dbus_connection_call_sync,
|
||||
GCancellable *, cancellable,
|
||||
GError **, error)
|
||||
{
|
||||
- if (parameters)
|
||||
+ if (parameters) {
|
||||
+ g_variant_ref_sink(parameters);
|
||||
g_variant_unref(parameters);
|
||||
+ }
|
||||
|
||||
VIR_MOCK_REAL_INIT(g_dbus_connection_call_sync);
|
||||
|
||||
diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c
|
||||
index 607638e9d0..646b999d96 100644
|
||||
--- a/tests/virfirewalltest.c
|
||||
+++ b/tests/virfirewalltest.c
|
||||
@@ -79,6 +79,9 @@ VIR_MOCK_WRAP_RET_ARGS(g_dbus_connection_call_sync,
|
||||
GVariant *reply = NULL;
|
||||
g_autoptr(GVariant) params = parameters;
|
||||
|
||||
+ if (params)
|
||||
+ g_variant_ref_sink(params);
|
||||
+
|
||||
VIR_MOCK_REAL_INIT(g_dbus_connection_call_sync);
|
||||
|
||||
if (STREQ(bus_name, "org.freedesktop.DBus") &&
|
||||
diff --git a/tests/virpolkittest.c b/tests/virpolkittest.c
|
||||
index 011d83a506..b7cbe28466 100644
|
||||
--- a/tests/virpolkittest.c
|
||||
+++ b/tests/virpolkittest.c
|
||||
@@ -52,6 +52,9 @@ VIR_MOCK_WRAP_RET_ARGS(g_dbus_connection_call_sync,
|
||||
GVariant *reply = NULL;
|
||||
g_autoptr(GVariant) params = parameters;
|
||||
|
||||
+ if (params)
|
||||
+ g_variant_ref_sink(params);
|
||||
+
|
||||
VIR_MOCK_REAL_INIT(g_dbus_connection_call_sync);
|
||||
|
||||
if (STREQ(bus_name, "org.freedesktop.PolicyKit1") &&
|
||||
diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c
|
||||
index c1411d7c05..bd0ca51140 100644
|
||||
--- a/tests/virsystemdtest.c
|
||||
+++ b/tests/virsystemdtest.c
|
||||
@@ -54,8 +54,10 @@ VIR_MOCK_WRAP_RET_ARGS(g_dbus_connection_call_sync,
|
||||
{
|
||||
GVariant *reply = NULL;
|
||||
|
||||
- if (parameters)
|
||||
+ if (parameters) {
|
||||
+ g_variant_ref_sink(parameters);
|
||||
g_variant_unref(parameters);
|
||||
+ }
|
||||
|
||||
VIR_MOCK_REAL_INIT(g_dbus_connection_call_sync);
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 2c51432376f0ff3743633fd655756260b88313ff Mon Sep 17 00:00:00 2001
|
||||
From: Roman Bolshakov <r.bolshakov@yadro.com>
|
||||
Date: Sun, 18 Oct 2020 18:30:56 +0300
|
||||
Subject: [PATCH 1/3] tests: Fix lstat() mock initialization on macOS
|
||||
|
||||
There is a typo that prevents initialization of real_lstat.
|
||||
|
||||
Fixes: d6b17edd5163 ("tests: Lookup extended stat/lstat in mocks")
|
||||
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
tests/virmockstathelpers.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c
|
||||
index 1a58025a0a..90b9ceedb6 100644
|
||||
--- a/tests/virmockstathelpers.c
|
||||
+++ b/tests/virmockstathelpers.c
|
||||
@@ -153,7 +153,7 @@ static void virMockStatInit(void)
|
||||
#endif
|
||||
#ifdef MOCK_LSTAT
|
||||
# ifdef __APPLE__
|
||||
- VIR_MOCK_REAL_INIT_ALIASED(stat, "lstat$INODE64");
|
||||
+ VIR_MOCK_REAL_INIT_ALIASED(lstat, "lstat$INODE64");
|
||||
# else
|
||||
VIR_MOCK_REAL_INIT(lstat);
|
||||
# endif
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,61 +0,0 @@
|
||||
From c46299170bd318bc1ffc95da1774515634fd03d9 Mon Sep 17 00:00:00 2001
|
||||
From: Roman Bolshakov <r.bolshakov@yadro.com>
|
||||
Date: Sun, 18 Oct 2020 18:30:57 +0300
|
||||
Subject: [PATCH 2/3] tests: Re-introduce stat/lstat mocks on macOS
|
||||
|
||||
Commit d6b17edd5163 ("tests: Lookup extended stat/lstat in mocks")
|
||||
adds support for mocking of stat() and lstat() on macOS.
|
||||
|
||||
The change was broken because virmockstathelpers.c only follows glibc
|
||||
logic and MOCK_STAT and MOCK_LSTAT are not getting defined on macOS.
|
||||
|
||||
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
tests/virmockstathelpers.c | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c
|
||||
index 90b9ceedb6..5a71de24e9 100644
|
||||
--- a/tests/virmockstathelpers.c
|
||||
+++ b/tests/virmockstathelpers.c
|
||||
@@ -55,6 +55,10 @@
|
||||
* Unfortunately, because we are trying to mock replace the C library,
|
||||
* we need to know about this internal impl detail.
|
||||
*
|
||||
+ * On macOS stat() and lstat() are resolved to _stat$INODE64 and
|
||||
+ * _lstat$INODE64, respectively. stat(2) man page also declares that
|
||||
+ * stat64(), lstat64() and fstat64() are deprecated.
|
||||
+ *
|
||||
* With all this in mind the list of functions we have to mock will depend
|
||||
* on several factors
|
||||
*
|
||||
@@ -68,8 +72,10 @@
|
||||
|
||||
|
||||
|
||||
-#if defined(WITH_STAT) && !defined(WITH___XSTAT) && !defined(WITH_STAT64)
|
||||
-# define MOCK_STAT
|
||||
+#if defined(WITH_STAT)
|
||||
+# if !defined(WITH___XSTAT) && !defined(WITH_STAT64) || defined(__APPLE__)
|
||||
+# define MOCK_STAT
|
||||
+# endif
|
||||
#endif
|
||||
#if defined(WITH_STAT64) && !defined(WITH___XSTAT64)
|
||||
# define MOCK_STAT64
|
||||
@@ -80,8 +86,10 @@
|
||||
#if defined(WITH___XSTAT64)
|
||||
# define MOCK___XSTAT64
|
||||
#endif
|
||||
-#if defined(WITH_LSTAT) && !defined(WITH___LXSTAT) && !defined(WITH_LSTAT64)
|
||||
-# define MOCK_LSTAT
|
||||
+#if defined(WITH_LSTAT)
|
||||
+# if !defined(WITH___LXSTAT) && !defined(WITH_LSTAT64) || defined(__APPLE__)
|
||||
+# define MOCK_LSTAT
|
||||
+# endif
|
||||
#endif
|
||||
#if defined(WITH_LSTAT64) && !defined(WITH___LXSTAT64)
|
||||
# define MOCK_LSTAT64
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,191 +0,0 @@
|
||||
From 2b93bcc7e84dfae34b16fd687b8c3d35fa0c54be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Thu, 29 Oct 2020 17:25:07 +0000
|
||||
Subject: [PATCH 3/3] tests: fix stat mocking with Fedora rawhide
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GLibC has a really complicated way of dealing with the 'stat' function
|
||||
historically, which means our mocks in turn have to look at four
|
||||
different possible functions to replace, stat, stat64, __xstat,
|
||||
__xstat64.
|
||||
|
||||
In Fedora 33 and earlier:
|
||||
|
||||
- libvirt.so links to __xstat64
|
||||
- libc.so library exports stat, stat64, __xstat, __xstat64
|
||||
- sys/stat.h header exposes stat and __xstat
|
||||
|
||||
In Fedora 34 rawhide:
|
||||
|
||||
- libvirt.so links to stat64
|
||||
- libc.so library exports stat, stat64, __xstat, __xstat64
|
||||
- sys/stat.h header exposes stat
|
||||
|
||||
Historically we only looked at the exported symbols from libc.so to
|
||||
decide which to mock.
|
||||
|
||||
In F34 though we must not consider __xstat / __xstat64 though because
|
||||
they only existance for binary compatibility. Newly built binaries
|
||||
won't reference them.
|
||||
|
||||
Thus we must introduce a header file check into our logic for deciding
|
||||
which symbol to mock. We must ignore the __xstat / __xstat64 symbols
|
||||
if they don't appear in the sys/stat.h header, even if they appear
|
||||
in libc.so
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
meson.build | 28 ++++++++++++-----
|
||||
tests/virmockstathelpers.c | 62 ++++++++++++++++++++++----------------
|
||||
2 files changed, 56 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 2e57a435df..87b4aaf9aa 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -636,10 +636,6 @@ libvirt_export_dynamic = cc.first_supported_link_argument([
|
||||
# check availability of various common functions (non-fatal if missing)
|
||||
|
||||
functions = [
|
||||
- '__lxstat',
|
||||
- '__lxstat64',
|
||||
- '__xstat',
|
||||
- '__xstat64',
|
||||
'elf_aux_info',
|
||||
'fallocate',
|
||||
'getauxval',
|
||||
@@ -653,8 +649,6 @@ functions = [
|
||||
'getuid',
|
||||
'getutxid',
|
||||
'if_indextoname',
|
||||
- 'lstat',
|
||||
- 'lstat64',
|
||||
'mmap',
|
||||
'newlocale',
|
||||
'pipe2',
|
||||
@@ -666,12 +660,23 @@ functions = [
|
||||
'setgroups',
|
||||
'setns',
|
||||
'setrlimit',
|
||||
- 'stat',
|
||||
- 'stat64',
|
||||
'symlink',
|
||||
'sysctlbyname',
|
||||
]
|
||||
|
||||
+stat_functions = [
|
||||
+ '__lxstat',
|
||||
+ '__lxstat64',
|
||||
+ '__xstat',
|
||||
+ '__xstat64',
|
||||
+ 'lstat',
|
||||
+ 'lstat64',
|
||||
+ 'stat',
|
||||
+ 'stat64',
|
||||
+]
|
||||
+
|
||||
+functions += stat_functions
|
||||
+
|
||||
foreach function : functions
|
||||
if cc.has_function(function)
|
||||
conf.set('WITH_@0@'.format(function.to_upper()), 1)
|
||||
@@ -679,6 +684,13 @@ foreach function : functions
|
||||
endforeach
|
||||
|
||||
|
||||
+foreach function : stat_functions
|
||||
+ if cc.has_header_symbol('sys/stat.h', function)
|
||||
+ conf.set('WITH_@0@_DECL'.format(function.to_upper()), 1)
|
||||
+ endif
|
||||
+endforeach
|
||||
+
|
||||
+
|
||||
# various header checks
|
||||
|
||||
headers = [
|
||||
diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c
|
||||
index 5a71de24e9..ebe357aa49 100644
|
||||
--- a/tests/virmockstathelpers.c
|
||||
+++ b/tests/virmockstathelpers.c
|
||||
@@ -67,39 +67,49 @@
|
||||
* - If __xstat & __xstat64 exist, then stat & stat64 will not exist
|
||||
* as symbols in the library, so the latter should not be mocked.
|
||||
*
|
||||
+ * - If __xstat exists in the library, but not the header than it
|
||||
+ * it is just there for binary back compat and should not be
|
||||
+ * mocked
|
||||
+ *
|
||||
* The same all applies to lstat()
|
||||
*/
|
||||
|
||||
|
||||
+#if !defined(WITH___XSTAT_DECL)
|
||||
+# if defined(WITH_STAT)
|
||||
+# if !defined(WITH___XSTAT) && !defined(WITH_STAT64) || defined(__APPLE__)
|
||||
+# define MOCK_STAT
|
||||
+# endif
|
||||
+# endif
|
||||
+# if defined(WITH_STAT64)
|
||||
+# define MOCK_STAT64
|
||||
+# endif
|
||||
+#else /* WITH___XSTAT_DECL */
|
||||
+# if defined(WITH___XSTAT) && !defined(WITH___XSTAT64)
|
||||
+# define MOCK___XSTAT
|
||||
+# endif
|
||||
+# if defined(WITH___XSTAT64)
|
||||
+# define MOCK___XSTAT64
|
||||
+# endif
|
||||
+#endif /* WITH___XSTAT_DECL */
|
||||
|
||||
-#if defined(WITH_STAT)
|
||||
-# if !defined(WITH___XSTAT) && !defined(WITH_STAT64) || defined(__APPLE__)
|
||||
-# define MOCK_STAT
|
||||
+#if !defined(WITH___LXSTAT_DECL)
|
||||
+# if defined(WITH_LSTAT)
|
||||
+# if !defined(WITH___LXSTAT) && !defined(WITH_LSTAT64) || defined(__APPLE__)
|
||||
+# define MOCK_LSTAT
|
||||
+# endif
|
||||
# endif
|
||||
-#endif
|
||||
-#if defined(WITH_STAT64) && !defined(WITH___XSTAT64)
|
||||
-# define MOCK_STAT64
|
||||
-#endif
|
||||
-#if defined(WITH___XSTAT) && !defined(WITH___XSTAT64)
|
||||
-# define MOCK___XSTAT
|
||||
-#endif
|
||||
-#if defined(WITH___XSTAT64)
|
||||
-# define MOCK___XSTAT64
|
||||
-#endif
|
||||
-#if defined(WITH_LSTAT)
|
||||
-# if !defined(WITH___LXSTAT) && !defined(WITH_LSTAT64) || defined(__APPLE__)
|
||||
-# define MOCK_LSTAT
|
||||
+# if defined(WITH_LSTAT64)
|
||||
+# define MOCK_LSTAT64
|
||||
# endif
|
||||
-#endif
|
||||
-#if defined(WITH_LSTAT64) && !defined(WITH___LXSTAT64)
|
||||
-# define MOCK_LSTAT64
|
||||
-#endif
|
||||
-#if defined(WITH___LXSTAT) && !defined(WITH___LXSTAT64)
|
||||
-# define MOCK___LXSTAT
|
||||
-#endif
|
||||
-#if defined(WITH___LXSTAT64)
|
||||
-# define MOCK___LXSTAT64
|
||||
-#endif
|
||||
+#else /* WITH___LXSTAT_DECL */
|
||||
+# if defined(WITH___LXSTAT) && !defined(WITH___LXSTAT64)
|
||||
+# define MOCK___LXSTAT
|
||||
+# endif
|
||||
+# if defined(WITH___LXSTAT64)
|
||||
+# define MOCK___LXSTAT64
|
||||
+# endif
|
||||
+#endif /* WITH___LXSTAT_DECL */
|
||||
|
||||
#ifdef MOCK_STAT
|
||||
static int (*real_stat)(const char *path, struct stat *sb);
|
||||
--
|
||||
2.28.0
|
||||
|
168
libvirt.spec
168
libvirt.spec
@ -12,36 +12,47 @@
|
||||
%define supported_platform 0
|
||||
%endif
|
||||
|
||||
# On RHEL 7 and older macro _vpath_builddir is not defined.
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%define _vpath_builddir %{_target_platform}
|
||||
%endif
|
||||
|
||||
%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
|
||||
%if 0%{?rhel}
|
||||
%define arches_qemu_kvm x86_64 %{power64} aarch64 s390x
|
||||
%endif
|
||||
|
||||
%define arches_64bit x86_64 %{power64} aarch64 s390x riscv64
|
||||
%define arches_x86 %{ix86} x86_64
|
||||
|
||||
%define arches_systemtap_64bit %{arches_64bit}
|
||||
%define arches_dmidecode %{arches_x86}
|
||||
%define arches_xen %{arches_x86} aarch64
|
||||
%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_numad %{arches_x86} %{power64} aarch64
|
||||
|
||||
# The hypervisor drivers that run in libvirtd
|
||||
%define with_qemu 0%{!?_without_qemu:1}
|
||||
%define with_lxc 0%{!?_without_lxc:1}
|
||||
%define with_libxl 0%{!?_without_libxl:1}
|
||||
%define with_vbox 0%{!?_without_vbox:1}
|
||||
|
||||
%define with_qemu_tcg %{with_qemu}
|
||||
|
||||
%define qemu_kvm_arches %{ix86} x86_64
|
||||
|
||||
%if 0%{?fedora}
|
||||
%define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
%define with_qemu_tcg 0
|
||||
%define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
|
||||
%endif
|
||||
|
||||
# On RHEL 7 and older macro _vpath_builddir is not defined.
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%define _vpath_builddir %{_target_platform}
|
||||
%endif
|
||||
|
||||
%ifarch %{qemu_kvm_arches}
|
||||
%ifarch %{arches_qemu_kvm}
|
||||
%define with_qemu_kvm %{with_qemu}
|
||||
%else
|
||||
%define with_qemu_kvm 0
|
||||
%endif
|
||||
|
||||
%define with_qemu_tcg %{with_qemu}
|
||||
|
||||
# RHEL disables TCG on all architectures
|
||||
%if 0%{?rhel}
|
||||
%define with_qemu_tcg 0
|
||||
%endif
|
||||
|
||||
%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
|
||||
%define with_qemu 0
|
||||
%endif
|
||||
@ -61,15 +72,13 @@
|
||||
%endif
|
||||
|
||||
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
|
||||
%ifnarch %{qemu_kvm_arches}
|
||||
%ifnarch %{arches_qemu_kvm}
|
||||
# gluster is only built where qemu driver is enabled on RHEL 8
|
||||
%if 0%{?rhel} >= 8
|
||||
%define with_storage_gluster 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%define with_numactl 0%{!?_without_numactl:1}
|
||||
|
||||
# F25+ has zfs-fuse
|
||||
%if 0%{?fedora}
|
||||
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
|
||||
@ -84,40 +93,35 @@
|
||||
%define with_storage_iscsi_direct 0
|
||||
%endif
|
||||
|
||||
# Other optional features
|
||||
%define with_numactl 0%{!?_without_numactl:1}
|
||||
|
||||
# A few optional bits off by default, we enable later
|
||||
%define with_fuse 0%{!?_without_fuse:0}
|
||||
%define with_sanlock 0%{!?_without_sanlock:0}
|
||||
%define with_numad 0%{!?_without_numad:0}
|
||||
%define with_firewalld 0%{!?_without_firewalld:0}
|
||||
%define with_firewalld_zone 0%{!?_without_firewalld_zone:0}
|
||||
%define with_libssh2 0%{!?_without_libssh2:0}
|
||||
%define with_wireshark 0%{!?_without_wireshark:0}
|
||||
%define with_libssh 0%{!?_without_libssh:0}
|
||||
%define with_fuse 0%{!?_without_fuse:0}
|
||||
%define with_sanlock 0%{!?_without_sanlock:0}
|
||||
%define with_numad 0%{!?_without_numad:0}
|
||||
%define with_firewalld_zone 0%{!?_without_firewalld:0}
|
||||
%define with_libssh2 0%{!?_without_libssh2:0}
|
||||
%define with_wireshark 0%{!?_without_wireshark:0}
|
||||
%define with_libssh 0%{!?_without_libssh:0}
|
||||
%define with_dmidecode 0%{!?_without_dmidecode:0}
|
||||
|
||||
# Finally set the OS / architecture specific special cases
|
||||
|
||||
# Xen is available only on i386 x86_64 ia64
|
||||
%ifnarch %{ix86} x86_64 ia64
|
||||
# Architecture-dependent features
|
||||
%ifnarch %{arches_xen}
|
||||
%define with_libxl 0
|
||||
%endif
|
||||
|
||||
# vbox is available only on i386 x86_64
|
||||
%ifnarch %{ix86} x86_64
|
||||
%ifnarch %{arches_vbox}
|
||||
%define with_vbox 0
|
||||
%endif
|
||||
|
||||
# Numactl is not available on many non-x86 archs
|
||||
%ifarch s390 s390x %{arm} riscv64
|
||||
%ifnarch %{arches_numactl}
|
||||
%define with_numactl 0
|
||||
%endif
|
||||
|
||||
# zfs-fuse is not available on some architectures
|
||||
%ifarch s390 s390x aarch64 riscv64
|
||||
%ifnarch %{arches_zfs}
|
||||
%define with_storage_zfs 0
|
||||
%endif
|
||||
|
||||
# Ceph dropped support for 32-bit hosts
|
||||
%ifarch %{arm} %{ix86}
|
||||
%ifnarch %{arches_ceph}
|
||||
%define with_storage_rbd 0
|
||||
%endif
|
||||
|
||||
@ -137,8 +141,6 @@
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%define with_firewalld 1
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
|
||||
%endif
|
||||
@ -155,7 +157,7 @@
|
||||
%define with_sanlock 0%{!?_without_sanlock:1}
|
||||
%endif
|
||||
%if 0%{?rhel}
|
||||
%ifarch %{qemu_kvm_arches}
|
||||
%ifarch %{arches_qemu_kvm}
|
||||
%define with_sanlock 0%{!?_without_sanlock:1}
|
||||
%endif
|
||||
%endif
|
||||
@ -179,11 +181,15 @@
|
||||
%if %{with_qemu} || %{with_lxc}
|
||||
# numad is used to manage the CPU and memory placement dynamically,
|
||||
# it's not available on many non-x86 architectures.
|
||||
%ifnarch s390 s390x %{arm} riscv64
|
||||
%ifarch %{arches_numad}
|
||||
%define with_numad 0%{!?_without_numad:1}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%ifarch %{arches_dmidecode}
|
||||
%define with_dmidecode 0%{!?_without_dmidecode:1}
|
||||
%endif
|
||||
|
||||
# Force QEMU to run as non-root
|
||||
%define qemu_user qemu
|
||||
%define qemu_group qemu
|
||||
@ -207,8 +213,8 @@
|
||||
|
||||
Summary: Library providing a simple virtualization API
|
||||
Name: libvirt
|
||||
Version: 6.8.0
|
||||
Release: 5%{?dist}
|
||||
Version: 6.9.0
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: https://libvirt.org/
|
||||
|
||||
@ -216,12 +222,6 @@ URL: https://libvirt.org/
|
||||
%define mainturl stable_updates/
|
||||
%endif
|
||||
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
|
||||
# Fix glib errors in virsystemdtest
|
||||
Patch0001: 0001-tests-fix-incorrect-free-of-GVariant-in-our-GLib-moc.patch
|
||||
# Fix glibc incompatibility in stat() mocking
|
||||
Patch0002: 0002-tests-Fix-lstat-mock-initialization-on-macOS.patch
|
||||
Patch0003: 0003-tests-Re-introduce-stat-lstat-mocks-on-macOS.patch
|
||||
Patch0004: 0004-tests-fix-stat-mocking-with-Fedora-rawhide.patch
|
||||
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
||||
@ -364,7 +364,7 @@ BuildRequires: netcf-devel >= 0.2.2
|
||||
BuildRequires: libcurl-devel
|
||||
%endif
|
||||
%if %{with_hyperv}
|
||||
BuildRequires: libwsman-devel >= 2.2.3
|
||||
BuildRequires: libwsman-devel >= 2.6.3
|
||||
%endif
|
||||
BuildRequires: audit-libs-devel
|
||||
# we need /usr/sbin/dtrace
|
||||
@ -400,6 +400,7 @@ BuildRequires: rpcgen
|
||||
|
||||
BuildRequires: libtirpc-devel
|
||||
|
||||
# Needed for the firewalld_reload macro
|
||||
%if %{with_firewalld_zone}
|
||||
BuildRequires: firewalld-filesystem
|
||||
%endif
|
||||
@ -439,7 +440,7 @@ Requires: iproute-tc
|
||||
%endif
|
||||
|
||||
Requires: polkit >= 0.112
|
||||
%ifarch %{ix86} x86_64 ia64
|
||||
%if %{with_dmidecode}
|
||||
# For virConnectGetSysinfo
|
||||
Requires: dmidecode
|
||||
%endif
|
||||
@ -980,6 +981,13 @@ Libvirt plugin for NSS for translating domain names into IP addresses.
|
||||
%autosetup -S git_am
|
||||
|
||||
%build
|
||||
|
||||
%if 0%{?fedora} == 34
|
||||
# binutils change in F34 broke linking of tests
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1889763
|
||||
%define _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
%if ! %{supported_platform}
|
||||
echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
|
||||
exit 1
|
||||
@ -1083,12 +1091,6 @@ exit 1
|
||||
%define arg_sanlock -Dsanlock=disabled
|
||||
%endif
|
||||
|
||||
%if %{with_firewalld}
|
||||
%define arg_firewalld -Dfirewalld=enabled
|
||||
%else
|
||||
%define arg_firewalld -Dfirewalld=disabled
|
||||
%endif
|
||||
|
||||
%if %{with_firewalld_zone}
|
||||
%define arg_firewalld_zone -Dfirewalld_zone=enabled
|
||||
%else
|
||||
@ -1174,10 +1176,10 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
|
||||
-Dyajl=enabled \
|
||||
%{?arg_sanlock} \
|
||||
-Dlibpcap=enabled \
|
||||
-Dmacvtap=enabled \
|
||||
-Dlibnl=enabled \
|
||||
-Daudit=enabled \
|
||||
-Ddtrace=enabled \
|
||||
%{?arg_firewalld} \
|
||||
-Dfirewalld=enabled \
|
||||
%{?arg_firewalld_zone} \
|
||||
%{?arg_wireshark} \
|
||||
%{?arg_libssh} \
|
||||
@ -1192,6 +1194,9 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
|
||||
%{?enable_werror} \
|
||||
-Dexpensive_tests=enabled \
|
||||
-Dinit_script=systemd \
|
||||
-Ddocs=enabled \
|
||||
-Dtests=enabled \
|
||||
-Drpath=disabled \
|
||||
%{?arg_login_shell}
|
||||
|
||||
%meson_build
|
||||
@ -1271,7 +1276,7 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
|
||||
# Copied into libvirt-docs subpackage eventually
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs
|
||||
|
||||
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64
|
||||
%ifarch %{arches_systemtap_64bit}
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \
|
||||
$RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp
|
||||
|
||||
@ -1874,28 +1879,7 @@ exit 0
|
||||
%dir %{_datadir}/libvirt/schemas/
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
|
||||
|
||||
%{_datadir}/libvirt/schemas/basictypes.rng
|
||||
%{_datadir}/libvirt/schemas/capability.rng
|
||||
%{_datadir}/libvirt/schemas/cputypes.rng
|
||||
%{_datadir}/libvirt/schemas/domain.rng
|
||||
%{_datadir}/libvirt/schemas/domainbackup.rng
|
||||
%{_datadir}/libvirt/schemas/domaincaps.rng
|
||||
%{_datadir}/libvirt/schemas/domaincheckpoint.rng
|
||||
%{_datadir}/libvirt/schemas/domaincommon.rng
|
||||
%{_datadir}/libvirt/schemas/domainsnapshot.rng
|
||||
%{_datadir}/libvirt/schemas/interface.rng
|
||||
%{_datadir}/libvirt/schemas/network.rng
|
||||
%{_datadir}/libvirt/schemas/networkcommon.rng
|
||||
%{_datadir}/libvirt/schemas/networkport.rng
|
||||
%{_datadir}/libvirt/schemas/nodedev.rng
|
||||
%{_datadir}/libvirt/schemas/nwfilter.rng
|
||||
%{_datadir}/libvirt/schemas/nwfilter_params.rng
|
||||
%{_datadir}/libvirt/schemas/nwfilterbinding.rng
|
||||
%{_datadir}/libvirt/schemas/secret.rng
|
||||
%{_datadir}/libvirt/schemas/storagecommon.rng
|
||||
%{_datadir}/libvirt/schemas/storagepool.rng
|
||||
%{_datadir}/libvirt/schemas/storagepoolcaps.rng
|
||||
%{_datadir}/libvirt/schemas/storagevol.rng
|
||||
%{_datadir}/libvirt/schemas/*.rng
|
||||
|
||||
%{_datadir}/libvirt/cpu_map/*.xml
|
||||
|
||||
@ -1963,6 +1947,12 @@ exit 0
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Nov 4 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.9.0-2
|
||||
- Re-apply reverted fix for disabling glusterfs, curl, openswman and libiscsi
|
||||
|
||||
* Tue Nov 03 2020 Cole Robinson <crobinso@redhat.com> - 6.9.0-1
|
||||
- Update to version 6.9.0
|
||||
|
||||
* Mon Nov 2 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-4
|
||||
- Really fix meson option for disabling glusterfs
|
||||
- Fix disabling curl, openswman and libiscsi
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (libvirt-6.8.0.tar.xz) = 9b69f3dcceb5e40470a78908654faf51b643f6793e556f3115daa4bfe08743af290882dd51f15eb27c38d589eb210d495de7c44a40b363420ab4f4d3a6393cc9
|
||||
SHA512 (libvirt-6.9.0.tar.xz) = ca9aed93589e91d383f9a5bddf5ba9fa20b849ba3b302017d625ba4910a0f942d1531006ddeaaa2622d121808105dec6e9bcb0c867f62e2fc546ce043675e175
|
||||
|
Loading…
Reference in New Issue
Block a user