From ee49623348e53abe851a748a64ca0bfd8ac51bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 27 Nov 2023 17:33:24 +0000 Subject: [PATCH] check for incompatible libgovirt version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The virt-viewer code currently only works with librest 0.7 / libgovirt < 0.3.9. Check for this condition in meson to prevent later compile time errors. Signed-off-by: Daniel P. Berrangé --- meson.build | 11 +++++++++++ virt-viewer.spec.in | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/meson.build b/meson.build index 1f14e73..2dc741d 100644 --- a/meson.build +++ b/meson.build @@ -39,6 +39,7 @@ gtk_vnc_min_version='>=0.4.0' spice_gtk_min_version='>=0.35' spice_protocol_min_version='>=0.12.7' govirt_min_version='>=0.3.7' +govirt_max_version='>=0.3.9' rest_min_version='>=0.8' vte_min_version='>=0.46.0' bash_completion_version='2.0' @@ -446,6 +447,16 @@ if get_option('ovirt').auto() rest_dep = dependency('', required: false) endif endif +if govirt_dep.found() + new_govirt_dep = dependency('govirt-1.0', version: govirt_max_version, required: false) + if new_govirt_dep.found() + if get_option('ovirt').auto() + govirt_dep = dependency('', required: false) + else + error('libgovirt >= 0.3.9 (with librest-1.0) not supported') + endif + endif +endif if govirt_dep.found() if cc.has_function('ovirt_storage_domain_get_disks', dependencies: govirt_dep) conf_data.set('HAVE_OVIRT_STORAGE_DOMAIN_GET_DISKS', '1') diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in index cd80b82..8d22ebe 100644 --- a/virt-viewer.spec.in +++ b/virt-viewer.spec.in @@ -4,7 +4,12 @@ %global with_govirt 0 %global with_spice 0 %else +# Disabled due to incompatible govirt/librest +%if 0%{?fedora} >= 37 +%global with_govirt 0 +%else %global with_govirt 1 +%endif %global with_spice 1 %endif