From e97feeca542086afda3a1a9a2036d51abbe2415d Mon Sep 17 00:00:00 2001 From: Xianglai Li Date: Wed, 27 Nov 2024 15:58:15 +0800 Subject: [PATCH] enable spice for loongarch64 Signed-off-by: Xianglai Li --- qemu.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/qemu.spec b/qemu.spec index 69a3173..02a613d 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,4 +1,4 @@ -%define anolis_release 18 +%define anolis_release 19 %bcond_with check @@ -45,7 +45,7 @@ # Matches spice ExclusiveArch %global have_spice 0 -%ifarch x86_64 aarch64 +%ifarch x86_64 aarch64 loongarch64 %global have_spice 1 %endif @@ -151,7 +151,11 @@ %if %{have_spice} %define requires_ui_spice_app Requires: %{name}-ui-spice-app = %{evr} %define requires_ui_spice_core Requires: %{name}-ui-spice-core = %{evr} +%ifnarch loongarch64 %define requires_device_display_qxl Requires: %{name}-device-display-qxl = %{evr} +%else +%define requires_device_display_qxl %{nil} +%endif %define requires_audio_spice Requires: %{name}-audio-spice = %{evr} %define requires_char_spice Requires: %{name}-char-spice = %{evr} %else @@ -878,6 +882,7 @@ Obsoletes: qemu-kvm-ui-spice-app < %{EVR} %description ui-spice-app This package provides the additional spice-app UI for QEMU. +%ifnarch loongarch64 %package device-display-qxl Summary: QEMU QXL display device Requires: %{name}-common = %{EVR} @@ -885,6 +890,7 @@ Requires: %{name}-ui-spice-core = %{EVR} Obsoletes: qemu-kvm-device-display-qxl < %{EVR} %description device-display-qxl This package provides the QXL display device for QEMU. +%endif %package char-spice Summary: QEMU spice chardev driver @@ -1508,6 +1514,9 @@ rm -f %{buildroot}/%{_datadir}/systemtap/tapset/qemu-system-{alpha,avr,cris,hppa # remove unused header files rm -f %{buildroot}%{_includedir}/qemu-plugin.h +%ifarch loongarch64 +rm -f %{buildroot}%{_libdir}/%{name}/hw-display-qxl.so +%endif # Fedora specific stuff below %find_lang %{name} @@ -1791,8 +1800,10 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_libdir}/%{name}/audio-spice.so %files char-spice %{_libdir}/%{name}/chardev-spice.so +%ifnarch loongarch64 %files device-display-qxl %{_libdir}/%{name}/hw-display-qxl.so +%endif %files ui-spice-core %{_libdir}/%{name}/ui-spice-core.so %files ui-spice-app @@ -1931,6 +1942,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog +* Wed Nov 27 2024 Xianglai Li -2.8.2.0-19 +- enable spice for loongarch64 + * Tue Aug 20 2024 mgb01105731 -2.8.2.0-18 - fix CVE-2024-3446 -- Gitee