forked from open-edge-platform/edge-microvisor-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqemu.spec
More file actions
3886 lines (3369 loc) · 126 KB
/
qemu.spec
File metadata and controls
3886 lines (3369 loc) · 126 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Vendor: Intel Corporation
Distribution: Edge Microvisor Toolkit
# Provide a way to skip tests via rpmbuild `--without`
# This makes it easier to skip tests in copr repos, where
# the qemu test suite is historically flakey
%bcond_without check
# This spec is for AzLinux
%global emt_no_ui 0
%global __strip /bin/true
%global libfdt_version 1.6.0
%global libseccomp_version 2.4.0
%global libusbx_version 1.0.23
%global meson_version 0.61.3
%global usbredir_version 0.7.1
%if 0%{?emt}
%global ipxe_version 1.21.1
%else
%global ipxe_version 20200823-5.git4bd064de
%endif
%if 0%{?emt}
%global excluded_targets moxie-softmmu
%endif
%define have_vmsr_helper 0
%global have_memlock_limits 0
%global need_qemu_kvm 0
%ifarch %{ix86}
%global kvm_package system-x86
# need_qemu_kvm should only ever be used by x86
%global need_qemu_kvm 1
%define have_vmsr_helper 1
%endif
%ifarch x86_64
%global kvm_package system-x86
# need_qemu_kvm should only ever be used by x86
%global need_qemu_kvm 1
%define have_vmsr_helper 1
%endif
%ifarch %{power64}
%global have_memlock_limits 1
%global kvm_package system-ppc
%endif
%ifarch s390x
%global kvm_package system-s390x
%endif
%ifarch armv7hl
%global kvm_package system-arm
%endif
%ifarch aarch64
%global kvm_package system-aarch64
%endif
%ifarch %{mips}
%global kvm_package system-mips
%endif
%ifarch riscv64
%global kvm_package system-riscv
%endif
%global modprobe_kvm_conf %{_sourcedir}/kvm.conf
%ifarch s390x
%global modprobe_kvm_conf %{_sourcedir}/kvm-s390x.conf
%endif
%ifarch %{ix86} x86_64
%global modprobe_kvm_conf %{_sourcedir}/kvm-x86.conf
%endif
%global tools_only 0
%global user_static 1
%if 0%{?emt}
%global user_static 0
%endif
%global have_kvm 0
%if 0%{?kvm_package:1}
%global have_kvm 1
%endif
# On AzL numactl builds for arm and x86
%global have_numactl 1
%ifarch %{arm}
%global have_numactl 0
%endif
# Matches spice ExclusiveArch
%global have_spice 1
%ifnarch %{ix86} x86_64 %{arm} aarch64
%global have_spice 0
%endif
%if 0%{?emt}
%global have_spice 0
%endif
# Matches xen ExclusiveArch
%global have_xen 0
%if 0%{?fedora}
%ifarch x86_64 aarch64
%global have_xen 1
%endif
%endif
%global have_liburing 0
%if 0%{?emt}
%ifnarch %{arm}
%global have_liburing 1
%endif
%endif
%global have_virgl 0
%if 0%{?fedora}
%global have_virgl 1
%endif
%global have_pmem 0
%ifarch x86_64 %{power64}
%global have_pmem 1
%endif
%if 0%{?rhel} >= 10
%global have_pmem 0
%endif
%global have_jack 1
%if 0%{?emt}
%global have_jack 0
%endif
%global have_dbus_display 1
%if 0%{?emt}
%global have_dbus_display 0
%endif
%global have_libblkio 0
%if 0%{?fedora} >= 37
%global have_libblkio 1
%endif
%global have_gvnc_devel %{defined fedora}
%if 0%{?emt}
%global have_gvnc_devel 0
%endif
%global have_sdl_image %{defined fedora}
%if 0%{?emt}
%global have_sdl_image 0
%endif
%global have_fdt 1
%global have_opengl 1
%if 0%{?emt_no_ui}
%global have_opengl 0
%endif
%global have_usbredir 1
%global enable_werror 0
# Matches edk2.spec ExclusiveArch
%global have_edk2 0
%ifarch %{ix86} x86_64 %{arm} aarch64 riscv64
%global have_edk2 1
%endif
%if 0%{?emt}
%global have_edk2 0
%endif
# All modules should be listed here.
%define have_block_rbd 1
%ifarch %{ix86} %{arm}
%define have_block_rbd 0
%endif
# disable for azl till dependency is available
%if 0%{?emt}
%define have_block_rbd 0
%endif
%global have_block_gluster 1
%if 0%{?emt}
%global have_block_gluster 0
%endif
%define have_block_nfs 0
%if 0%{?emt}
%define have_block_nfs 1
%endif
%if 0%{?fedora}
%define have_block_nfs 1
%endif
%define have_librdma 1
%ifarch %{arm}
%define have_librdma 0
%endif
%define have_libcacard 1
# enable when dependency available in 3.0
%if 0%{?emt}
%define have_libcacard 0
%endif
%define have_rutabaga_gfx 0
%if 0%{?fedora} >= 40
%ifarch x86_64 aarch64
%define have_rutabaga_gfx 1
%endif
%endif
%global have_ui 1
%if 0%{?emt_no_ui}
%global have_ui 0
%endif
# gvnc not available
%global have_gvnc 0
# Mariner builds all default targets except for Moxie, PPC, SPARC targets
# The Moxie exclusion is inherited from Fedora
# Both PPC and SPARC targets require packages that only build natively on the target platforms
# and Mariner cannot support that at the moment.
%bcond_with ppc_support
%bcond_with sparc_support
# Temporarily disabled features waiting for missing BRs:
%bcond_with brltty
%bcond_with capstone
%bcond_with libssh
%bcond_with sdl
%bcond_with pipewire
# Enable Pulseaudio by default
%bcond_without pulseaudio
# LTO still has issues with qemu on armv7hl and aarch64
# https://bugzilla.redhat.com/show_bug.cgi?id=1952483
%global _lto_cflags %{nil}
%global firmwaredirs "%{_datadir}/qemu-firmware:%{_datadir}/ipxe/qemu:%{_datadir}/seavgabios:%{_datadir}/seabios"
%if 0%{?emt}
%ifarch x86_64
%global firmwaredirs "%{_datadir}/qemu-firmware:%{_datadir}/seavgabios:%{_datadir}/seabios:%{_datadir}/sgabios"
%else
%global firmwaredirs "%{_datadir}/qemu-firmware"
%endif
%endif
%global qemudocdir %{_docdir}/%{name}
%if 0%{?emt}
%define evr %{version}-%{release}
%else
%define evr %{version}-%{release}
%endif
%if %{have_libblkio}
%define requires_block_blkio Requires: %{name}-block-blkio = %{evr}
%else
%define requires_block_blkio %{nil}
%endif
%define requires_block_curl Requires: %{name}-block-curl = %{evr}
%define requires_block_dmg Requires: %{name}-block-dmg = %{evr}
%if %{have_block_gluster}
%define requires_block_gluster Requires: %{name}-block-gluster = %{evr}
%define obsoletes_block_gluster %{nil}
%else
%define requires_block_gluster %{nil}
%define obsoletes_block_gluster Obsoletes: %{name}-block-gluster < %{evr}
%endif
%define requires_block_iscsi Requires: %{name}-block-iscsi = %{evr}
%if %{have_block_nfs}
%define requires_block_nfs Requires: %{name}-block-nfs = %{evr}
%define obsoletes_block_nfs %{nil}
%else
%define requires_block_nfs %{nil}
%define obsoletes_block_nfs Obsoletes: %{name}-block-nfs < %{evr}
%endif
%if %{have_block_rbd}
%define requires_block_rbd Requires: %{name}-block-rbd = %{evr}
%define obsoletes_block_rbd %{nil}
%else
%define requires_block_rbd %{nil}
%define obsoletes_block_rbd Obsoletes: %{name}-block-rbd < %{evr}
%endif
%if %{with libssh}
%define requires_block_ssh Requires: %{name}-block-ssh = %{evr}
%else
%define requires_block_ssh %{nil}
%endif
%define requires_audio_alsa Requires: %{name}-audio-alsa = %{evr}
%define requires_audio_oss Requires: %{name}-audio-oss = %{evr}
%if 0%{?emt}
%if %{with pulseaudio}
%define pa_drv pa,
%endif
%else
%define requires_audio_pa Requires: %{name}-audio-pa = %{evr}
%endif
%if %{with pipewire}
%define requires_audio_pipewire Requires: %{name}-audio-pipewire = %{evr}
%else
%define requires_audio_pipewire %{nil}
%endif
%if %{with sdl}
%define sdl_drv sdl,
%define requires_audio_sdl Requires: %{name}-audio-sdl = %{evr}
%else
%define requires_audio_sdl %{nil}
%endif
%if %{with brltty}
%define requires_char_baum Requires: %{name}-char-baum = %{evr}
%else
%define requires_char_baum %{nil}
%endif
%define requires_device_usb_host Requires: %{name}-device-usb-host = %{evr}
%define requires_device_usb_redirect Requires: %{name}-device-usb-redirect = %{evr}
%define requires_ui_curses Requires: %{name}-ui-curses = %{evr}
%define requires_device_display_virtio_gpu Requires: %{name}-device-display-virtio-gpu = %{evr}
%define requires_device_display_virtio_gpu_pci Requires: %{name}-device-display-virtio-gpu-pci = %{evr}
%define requires_device_display_virtio_gpu_ccw Requires: %{name}-device-display-virtio-gpu-ccw = %{evr}
%define requires_device_display_virtio_vga Requires: %{name}-device-display-virtio-vga = %{evr}
%define requires_package_qemu_pr_helper Requires: qemu-pr-helper
%if 0%{emt}
%define requires_package_virtiofsd Requires: vhostuser-backend(fs)
%define obsoletes_package_virtiofsd Obsoletes: %{name}-virtiofsd < %{evr}
%else
%define requires_package_virtiofsd Requires: virtiofsd
%endif
%if %{have_virgl}
%define requires_device_display_vhost_user_gpu Requires: %{name}-device-display-vhost-user-gpu = %{evr}
%define requires_device_display_virtio_gpu_gl Requires: %{name}-device-display-virtio-gpu-gl = %{evr}
%define requires_device_display_virtio_gpu_pci_gl Requires: %{name}-device-display-virtio-gpu-pci-gl = %{evr}
%define requires_device_display_virtio_vga_gl Requires: %{name}-device-display-virtio-vga-gl = %{evr}
%else
%define requires_device_display_vhost_user_gpu %{nil}
%define requires_device_display_virtio_gpu_gl %{nil}
%define requires_device_display_virtio_gpu_pci_gl %{nil}
%define requires_device_display_virtio_vga_gl %{nil}
%endif
%if %{have_rutabaga_gfx}
%define requires_device_display_virtio_gpu_rutabaga Requires: %{name}-device-display-virtio-gpu-rutabaga = %{evr}
%define requires_device_display_virtio_gpu_pci_rutabaga Requires: %{name}-device-display-virtio-gpu-pci-rutabaga = %{evr}
%define requires_device_display_virtio_vga_rutabaga Requires: %{name}-device-display-virtio-vga-rutabaga = %{evr}
%else
%define requires_device_display_virtio_gpu_rutabaga %{nil}
%define requires_device_display_virtio_gpu_pci_rutabaga %{nil}
%define requires_device_display_virtio_vga_rutabaga %{nil}
%endif
%if %{have_jack}
%define jack_drv jack,
%define requires_audio_jack Requires: %{name}-audio-jack = %{evr}
%else
%define requires_audio_jack %{nil}
%endif
%if %{have_dbus_display}
%define requires_audio_dbus Requires: %{name}-audio-dbus = %{evr}
%define requires_ui_dbus Requires: %{name}-ui-dbus = %{evr}
%else
%define requires_audio_dbus %{nil}
%define requires_ui_dbus %{nil}
%endif
%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}
%define requires_device_display_qxl Requires: %{name}-device-display-qxl = %{evr}
%define requires_audio_spice Requires: %{name}-audio-spice = %{evr}
%define requires_char_spice Requires: %{name}-char-spice = %{evr}
%else
%define requires_ui_spice_app %{nil}
%define requires_ui_spice_core %{nil}
%define requires_device_display_qxl %{nil}
%define requires_audio_spice %{nil}
%define requires_char_spice %{nil}
%endif
%if %{have_libcacard}
%define requires_device_usb_smartcard Requires: %{name}-device-usb-smartcard = %{evr}
%else
%define requires_device_usb_smartcard %{nil}
%endif
%global requires_all_modules \
%{requires_block_blkio} \
%{requires_block_curl} \
%{requires_block_dmg} \
%{requires_block_gluster} \
%{requires_block_iscsi} \
%{requires_block_nfs} \
%{requires_block_rbd} \
%{requires_block_ssh} \
%{requires_audio_alsa} \
%{requires_audio_dbus} \
%{requires_audio_oss} \
%{requires_audio_pipewire} \
%{requires_audio_sdl} \
%{requires_audio_jack} \
%{requires_audio_spice} \
%{requires_ui_curses} \
%{requires_ui_spice_app} \
%{requires_ui_spice_core} \
%{requires_char_baum} \
%{requires_char_spice} \
%{requires_device_display_qxl} \
%{requires_device_display_vhost_user_gpu} \
%{requires_device_display_virtio_gpu} \
%{requires_device_display_virtio_gpu_ccw} \
%{requires_device_display_virtio_gpu_gl} \
%{requires_device_display_virtio_gpu_rutabaga} \
%{requires_device_display_virtio_gpu_pci} \
%{requires_device_display_virtio_gpu_pci_gl} \
%{requires_device_display_virtio_gpu_pci_rutabaga} \
%{requires_device_display_virtio_vga} \
%{requires_device_display_virtio_vga_gl} \
%{requires_device_display_virtio_vga_rutabaga} \
%{requires_device_usb_host} \
%{requires_device_usb_redirect} \
%{requires_device_usb_smartcard} \
%{requires_package_qemu_pr_helper} \
%{requires_package_virtiofsd} \
# Modules which can be conditionally built
%global obsoletes_some_modules \
%{obsoletes_block_gluster} \
%{obsoletes_block_rbd} \
%{obsoletes_package_virtiofsd} \
Obsoletes: %{name}-system-lm32 <= %{version}-%{release} \
Obsoletes: %{name}-system-lm32-core <= %{version}-%{release} \
Obsoletes: %{name}-system-moxie <= %{version}-%{release} \
Obsoletes: %{name}-system-moxie-core <= %{version}-%{release} \
Obsoletes: %{name}-system-nios2 <= %{version}-%{release} \
Obsoletes: %{name}-system-nios2-core <= %{version}-%{release} \
Obsoletes: %{name}-system-unicore32 <= %{version}-%{release} \
Obsoletes: %{name}-system-unicore32-core <= %{version}-%{release} \
Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38
%if 0%{?rcver}
%global rcrel .%{rcver}
%global rcstr -%{rcver}
%endif
%if %{without ppc_support}
%global excluded_targets %{excluded_targets},ppc-softmmu,ppc64-softmmu,ppc-linux-user,ppc64-linux-user,ppc64le-linux-user
%endif
%if %{without sparc_support}
%global excluded_targets %{excluded_targets},sparc-softmmu,sparc64-softmmu,sparc-linux-user,sparc32plus-linux-user,sparc64-linux-user
%endif
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 9.1.0
Release: 1%{?dist}
License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND FSFAP AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND MIT AND LicenseRef-Fedora-Public-Domain AND CC-BY-3.0
URL: http://www.qemu.org/
%global dlurl https://download.qemu.org
Source0: %{dlurl}/%{name}-%{version}%{?rcstr}.tar.xz
# qemu 9.0.0 errors with:
# RPM build errors:
# Missing build-id in /tmp/rpmbuild/BUILDROOT/qemu-9.0.0-1.rc2.fc41.x86_64/usr/share/qemu/hppa-firmware.img
# Missing build-id in /tmp/rpmbuild/BUILDROOT/qemu-9.0.0-1.rc2.fc41.x86_64/usr/share/qemu/hppa-firmware64.img
# Generating build-id links failed
%global _missing_build_ids_terminate_build 0
Source10: qemu-guest-agent.service
Source11: 99-qemu-guest-agent.rules
Source12: bridge.conf
Source17: qemu-ga.sysconfig
Source21: 95-kvm-memlock.conf
Source26: vhost.conf
Source27: kvm.conf
Source30: kvm-s390x.conf
Source31: kvm-x86.conf
Source36: README.tests
# Skip failing test in copr
# https://gitlab.com/qemu-project/qemu/-/issues/2541
Patch1: 0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch
# https://patchwork.kernel.org/project/qemu-devel/patch/20231128143647.847668-1-crobinso@redhat.com/
# Fix pvh.img ld build failure on fedora rawhide
Patch2: 0001-pc-bios-optionrom-Fix-pvh.img-ld-build-failure-on-fe.patch
#Patch3: 0002-Disable-failing-tests-on-azl.patch
# SRIOV patches
Patch4: 0001-ui-gtk-Attach-fullscreen-toggling-cb-to-all-detached.patch
Patch5: 0002-ui-egl-helpers-Consolidates-create-sync-and-create-f.patch
Patch6: 0003-ui-dmabuf-Remove-sync-from-QemuDmaBuf-struct.patch
Patch7: 0004-hw-display-virtio-gpu-Introducing-render_sync-param.patch
Patch8: 0005-ui-gtk-Start-rendering-of-guest-blob-scandout-if-ren.patch
Patch9: 0006-ui-gtk-Factor-out-tab-window-creation-into-a-separat.patch
Patch10: 0007-ui-gtk-Add-a-new-parameter-to-assign-connectors-moni.patch
Patch11: 0008-ui-gtk-Page-number-of-1-is-not-a-valid-page-number.patch
Patch12: 0009-ui-gtk-move-guest-mouse-cursor-after-host-cursor-hit.patch
Patch13: 0010-ui-gtk-Register-shortcut-key-for-grab_input-to-accel.patch
Patch14: 0011-audio-Switch-audio-status-with-Guest-VM-switch-from-.patch
Patch15: 0012-usb-hid-added-new-type-for-touch-stylus.patch
Patch16: 0013-ui-gtk-Adds-status-bar-and-display-guest-ups-and-dra.patch
Patch17: 0014-ui-gtk-Refresh-grabbing-status-when-the-window-is-fo.patch
Patch18: 0015-ui-gtk-untabifying-even-the-primary-window.patch
Patch19: 0016-ui-gtk-Forcefully-full-screening-window.patch
Patch20: 0017-ui-spice-Add-an-option-for-users-to-provide-a-prefer.patch
Patch21: 0018-ui-spice-Enable-gl-on-option-for-non-local-or-remote.patch
Patch22: 0019-ui-spice-Submit-the-gl_draw-requests-at-60-FPS-for-r.patch
Patch23: 0020-ui-console-gl-Add-a-helper-to-create-a-texture-with-.patch
Patch24: 0021-ui-spice-Create-another-texture-with-linear-layout-w.patch
Patch25: 0022-ui-spice-Blit-the-scanout-texture-if-its-memory-layo.patch
Patch26: 0023-ui-gtk-Enables-HW-cursor.patch
Patch27: 0024-ui-gtk-Hardcode-default-size-of-new-tab-window-to-96.patch
Patch28: 0025-ui-gtk-Added-an-input-mode.patch
Patch29: 0026-ui-gtk-Scanout-flush-only-if-guest-framebuffer-exist.patch
Patch30: 0027-virtio-gpu-Replace-the-surface-with-null-surface-onl.patch
Patch31: 0028-virtio-gpu-Recreate-the-resource-s-dmabuf-if-new-bac.patch
Patch32: 0029-virtio-gpu-Find-the-host-addr-given-gpa-associated-w.patch
Patch33: 0030-virtio-gpu-udmabuf-Create-dmabuf-from-mr-associated-.patch
Patch34: 0031-gtk-Skip-to-configure-the-size-only-in-HPD-case.patch
Patch35: 0032-ui-spice-unblock-the-console-when-the-scanout-is-bei.patch
Patch36: 0033-virtio-gpu-Update-cursor-data-only-if-it-is-valid.patch
Patch37: 0034-virtio-gpu-Freeing-udmabuf-and-make-dmabuf-NULL-when.patch
Patch38: 0035-Revert-ui-gtk-Fix-mouse-motion-event-scaling-issue-w.patch
Patch39: 0036-virtio-gpu-udmabuf-gtk-Set-dmabuf_fd-1-to-prevent-fu.patch
Patch40: 0037-ui-gtk-egl-Skip-refreshing-frame-and-hw-cursor-if-th.patch
Patch41: 0038-ui-gtk-Refreshing-is-also-counted-when-calculating-F.patch
Patch42: 0039-ui-gtk-FPS-and-UPS-are-updated-every-1-sec-instead-o.patch
Patch43: 0040-ui-gtk-fps-param-for-gd_gl_count_frame.patch
Patch44: 0041-hw-virtio-gpu-udmabuf-g-dmabuf.primary-i-shouldn-t-b.patch
Patch45: 0042-ui-gtk-Unblock-zero-copy-display-pipeline-before-sav.patch
Patch46: 0043-ui-gtk-show-fps-works-on-GFX-consoles.patch
Patch47: 0044-ui-gtk-egl-Skipping-frame-drawing-if-not-necessary.patch
Patch48: 0045-ui-gtk-HPD-handling-disconnection-immediately.patch
Patch49: 0046-ui-gtk-egl-Cursor-image-texture-filtering-using-GL_N.patch
Patch50: 0047-ui-gtk-Covering-render_sync-false-case-when-dealing-.patch
Patch51: 0048-ui-gtk-egl-Cursor-texture-needs-to-be-re-created-whe.patch
Patch52: 0049-Adding-default-docs.patch
Patch53: 0050-gtk-Abort-if-there-is-no-connector-set-for-primary-w.patch
BuildRequires: gnupg2
BuildRequires: meson >= %{meson_version}
BuildRequires: bison
BuildRequires: flex
BuildRequires: zlib-devel
BuildRequires: glib2-devel
BuildRequires: gnutls-devel
BuildRequires: libselinux-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: libaio-devel
BuildRequires: python3-devel
BuildRequires: libiscsi-devel
BuildRequires: libattr-devel
BuildRequires: libusbx-devel >= %{libusbx_version}
%if %{have_usbredir}
BuildRequires: usbredir-devel >= %{usbredir_version}
%endif
# Required for docs. Disable for AzLinux, to reduce python package dependencies
%if ! 0%{?emt}
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
%endif
BuildRequires: libseccomp-devel >= %{libseccomp_version}
# For network block driver
BuildRequires: libcurl-devel
%if %{with libssh}
BuildRequires: libssh-devel
%endif
%if %{have_block_rbd}
BuildRequires: librbd-devel
%endif
# We need both because the 'stap' binary is probed for by configure
BuildRequires: systemtap
BuildRequires: systemtap-sdt-devel
BuildRequires: /usr/bin/dtrace
# For VNC PNG support
BuildRequires: libpng-devel
# For virtiofs
BuildRequires: libcap-ng-devel
# Hard requirement for version >= 1.3
BuildRequires: pixman-devel
# For rdma
%if %{have_librdma}
BuildRequires: rdma-core-devel
%endif
%if %{have_fdt}
BuildRequires: libfdt-devel >= %{libfdt_version}
%endif
# For compressed guest memory dumps
BuildRequires: lzo-devel snappy-devel
# For NUMA memory binding
%if %{have_numactl}
BuildRequires: numactl-devel
%endif
# qemu-pr-helper multipath support (requires libudev too)
BuildRequires: device-mapper-multipath-devel
BuildRequires: systemd-devel
%if %{have_pmem}
BuildRequires: libpmem-devel
%endif
# qemu-keymap
BuildRequires: pkgconfig(xkbcommon)
%if %{have_opengl}
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(gbm)
%endif
BuildRequires: perl-Test-Harness
BuildRequires: libslirp-devel
BuildRequires: libbpf-devel >= 1.0.0
%if %{have_libblkio}
BuildRequires: libblkio-devel
%endif
# Fedora specific
%if "%{toolchain}" == "clang"
BuildRequires: clang
%else
BuildRequires: gcc
%endif
BuildRequires: make
# For autosetup git_am
BuildRequires: git
# -display sdl support
%if %{with sdl}
BuildRequires: SDL2-devel
%endif
%if %{with pulseaudio}
# pulseaudio audio output
BuildRequires: pulseaudio-libs-devel
%endif
# alsa audio output
BuildRequires: alsa-lib-devel
%if %{have_block_nfs}
# NFS drive support
BuildRequires: libnfs-devel
%endif
# curses display backend
BuildRequires: ncurses-devel
%if %{have_spice}
# spice graphics support
BuildRequires: spice-protocol
BuildRequires: spice-server-devel
%endif
# VNC JPEG support
BuildRequires: libjpeg-devel
%if %{with brltty}
# Braille device support
BuildRequires: brlapi-devel
%endif
%if %{have_block_gluster}
# gluster block driver
BuildRequires: glusterfs-api-devel
%endif
# GTK frontend
BuildRequires: gtk3-devel
BuildRequires: vte291-devel
# GTK translations
BuildRequires: gettext
%if %{have_xen}
# Xen support
BuildRequires: xen-devel
%endif
# reading bzip2 compressed dmg images
BuildRequires: bzip2-devel
# TLS test suite
BuildRequires: libtasn1-devel
%if %{have_libcacard}
# smartcard device
BuildRequires: libcacard-devel
%endif
%if %{have_virgl}
# virgl 3d support
BuildRequires: virglrenderer-devel
%endif
%if %{with capstone}
# preferred disassembler for TCG
BuildRequires: capstone-devel
%endif
# qemu-ga
BuildRequires: libudev-devel
# qauth infrastructure
BuildRequires: pam-devel
%if %{have_liburing}
# liburing support. Library isn't built for arm
BuildRequires: liburing-devel
%endif
# zstd compression support
BuildRequires: libzstd-devel
# `hostname` used by test suite
# XXX: Fix me once hostname rpm is available
#BuildRequires: hostname
# nvdimm dax
BuildRequires: daxctl-devel
# fuse block device
BuildRequires: fuse-devel
%if %{have_jack}
# jack audio driver
BuildRequires: (pipewire-jack-audio-connection-kit-devel or jack-audio-connection-kit-devel)
%endif
BuildRequires: fuse3-devel
%if %{have_sdl_image}
BuildRequires: SDL2_image-devel
%endif
%if %{have_ui} && %{have_gvnc}
# Used by vnc-display-test
BuildRequires: pkgconfig(gvnc-1.0)
%endif
%if %{with pipewire}
# Used by pipewire audio backend
BuildRequires: pipewire-devel
%endif
# Used by cryptodev-backend-lkcf
BuildRequires: keyutils-libs-devel
#xdp-tools is available only for x86_64 on Azure Linux
%ifarch x86_64
# Used by net AF_XDP
BuildRequires: libxdp-devel
%endif
# used by virtio-gpu-rutabaga
%if %{have_rutabaga_gfx}
BuildRequires: rutabaga-gfx-ffi-devel
%endif
%if 0%{?emt}
# Builds on centos-stream 9 require python-tomli
BuildRequires: python-tomli
%endif
%if %{user_static}
BuildRequires: glibc-static >= 2.38-10
BuildRequires: glib2-static
BuildRequires: zlib-static
# -latomic added by GLib 2.81.0, 2024-06-28
# BuildRequires: libatomic-static
%endif
# Requires for the Fedora 'qemu' metapackage
Requires: %{name}-user = %{version}-%{release}
Requires: %{name}-system-aarch64 = %{version}-%{release}
Requires: %{name}-system-alpha = %{version}-%{release}
Requires: %{name}-system-arm = %{version}-%{release}
Requires: %{name}-system-avr = %{version}-%{release}
Requires: %{name}-system-cris = %{version}-%{release}
Requires: %{name}-system-loongarch64 = %{version}-%{release}
Requires: %{name}-system-m68k = %{version}-%{release}
Requires: %{name}-system-microblaze = %{version}-%{release}
Requires: %{name}-system-mips = %{version}-%{release}
Requires: %{name}-system-or1k = %{version}-%{release}
%if %{with ppc_support}
Requires: %{name}-system-ppc = %{version}-%{release}
%endif
Requires: %{name}-system-riscv = %{version}-%{release}
Requires: %{name}-system-rx = %{version}-%{release}
Requires: %{name}-system-s390x = %{version}-%{release}
Requires: %{name}-system-sh4 = %{version}-%{release}
%if %{with sparc_support}
Requires: %{name}-system-sparc = %{version}-%{release}
%endif
Requires: %{name}-system-tricore = %{version}-%{release}
%ifarch x86_64
Requires: %{name}-system-x86 = %{version}-%{release}
%endif
Requires: %{name}-system-xtensa = %{version}-%{release}
Requires: %{name}-img = %{version}-%{release}
Requires: %{name}-tools = %{version}-%{release}
%description
%{name} is an open source virtualizer that provides hardware
emulation for the KVM hypervisor. %{name} acts as a virtual
machine monitor together with the KVM kernel modules, and emulates the
hardware for a full system such as a PC and its associated peripherals.
%package common
Summary: QEMU common files needed by all QEMU targets
Requires(post): /usr/bin/getent
Requires(post): /usr/sbin/groupadd
Requires(post): /usr/sbin/useradd
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%{obsoletes_some_modules}
%if %{?emt}
# AzLinux specific
%ifarch x86_64
Requires: %{name}-ipxe = %{version}-%{release}
%endif
%else
Requires: ipxe-roms-qemu >= %{ipxe_version}
%endif
%description common
%{name} is an open source virtualizer that provides hardware emulation for
the KVM hypervisor.
This package provides documentation and auxiliary programs used with %{name}.
# Azlinux - these are simple files that don't require python-spinx pkg
%package docs
Summary: %{name} documentation
BuildArch: noarch
%description docs
%{name}-docs provides documentation files regarding %{name}.
%package -n qemu-img
Summary: QEMU command line tool for manipulating disk images
%description -n qemu-img
This package provides a command line tool for manipulating disk images.
%if %{have_ui}
%package -n qemu-with-ui
Summary: QEMU with ui
Requires: %{name}-ui-gtk = %{version}-%{release}
%if %{with sdl}
Requires: %{name}-ui-sdl = %{version}-%{release}
%endif
Requires: %{name}-ui-egl-headless = %{version}-%{release}
Requires: %{name}-ui-opengl = %{version}-%{release}
%description -n qemu-with-ui
This package provides the additional gtk / sdl / egl / opengl for QEMU ui.
%endif
%package -n qemu-guest-agent
Summary: QEMU guest agent
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description -n qemu-guest-agent
%{name} is an open source virtualizer that provides hardware emulation for
the KVM hypervisor.
This package provides an agent to run inside guests, which communicates
with the host over a virtio-serial channel named "org.qemu.guest_agent.0"
This package does not need to be installed on the host OS.
%package tools
Summary: %{name} support tools
%description tools
%{name}-tools provides various tools related to %{name} usage.
%package -n qemu-pr-helper
Summary: qemu-pr-helper utility for %{name}
%description -n qemu-pr-helper
This package provides the qemu-pr-helper utility that is required for certain
SCSI features.
%package tests
Summary: tests for the %{name} package
Requires: %{name} = %{version}-%{release}
%define testsdir %{_libdir}/%{name}/tests-src
%description tests
The %{name}-tests rpm contains tests that can be used to verify
the functionality of the installed %{name} package
Install this package if you want access to the avocado_qemu
tests, or qemu-iotests.
%if %{have_libblkio}
%package block-blkio
Summary: QEMU blkio block driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-blkio
This package provides the additional blkio block driver for QEMU.
Install this package if you want to access disks over vhost-user-blk, vdpa-blk,
and other transports using the libblkio library.
%endif
%package block-curl
Summary: QEMU CURL block driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-curl
This package provides the additional CURL block driver for QEMU.
Install this package if you want to access remote disks over
http, https, ftp and other transports provided by the CURL library.
%package block-iscsi
Summary: QEMU iSCSI block driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-iscsi
This package provides the additional iSCSI block driver for QEMU.
Install this package if you want to access iSCSI volumes.
%if %{have_block_rbd}
%package block-rbd
Summary: QEMU Ceph/RBD block driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-rbd
This package provides the additional Ceph/RBD block driver for QEMU.
Install this package if you want to access remote Ceph volumes
using the rbd protocol.
%endif
%if %{with libssh}
%package block-ssh
Summary: QEMU SSH block driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-ssh
This package provides the additional SSH block driver for QEMU.
Install this package if you want to access remote disks using
the Secure Shell (SSH) protocol.
%endif
%if %{have_opengl}
%package ui-opengl
Summary: QEMU opengl support
Requires: %{name}-common%{?_isa} = %{version}-%{release}
Requires: mesa-libGL
Requires: mesa-libEGL
Requires: mesa-dri-drivers
%description ui-opengl
This package provides opengl support.
%endif
# Fedora specific
%package block-dmg
Summary: QEMU block driver for DMG disk images
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-dmg
This package provides the additional DMG block driver for QEMU.
Install this package if you want to open '.dmg' files.
%if %{have_block_gluster}
%package block-gluster
Summary: QEMU Gluster block driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-gluster
This package provides the additional Gluster block driver for QEMU.
Install this package if you want to access remote Gluster storage.
%endif
%if %{have_block_nfs}
%package block-nfs
Summary: QEMU NFS block driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description block-nfs
This package provides the additional NFS block driver for QEMU.
Install this package if you want to access remote NFS storage.
%endif
%package audio-alsa
Summary: QEMU ALSA audio driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description audio-alsa
This package provides the additional ALSA audio driver for QEMU.
%if %{have_dbus_display}
%package audio-dbus
Summary: QEMU D-Bus audio driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description audio-dbus
This package provides the additional D-Bus audio driver for QEMU.
%endif
%package audio-oss
Summary: QEMU OSS audio driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description audio-oss
This package provides the additional OSS audio driver for QEMU.
%if %{with pulseaudio}
%package audio-pa
Summary: QEMU PulseAudio audio driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description audio-pa
This package provides the additional PulseAudio audio driver for QEMU.
%endif
%if %{with pipewire}
%package audio-pipewire
Summary: QEMU Pipewire audio driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description audio-pipewire
This package provides the additional Pipewire audio driver for QEMU.
%endif
%if %{with sdl}
%package audio-sdl
Summary: QEMU SDL audio driver
Requires: %{name}-common%{?_isa} = %{version}-%{release}
%description audio-sdl
This package provides the additional SDL audio driver for QEMU.