]> git.pld-linux.org Git - packages/qemu.git/blobdiff - qemu.spec
- bumped xen dependency to most featured version
[packages/qemu.git] / qemu.spec
index ca32d45fc6f4965b1d3bd30c7ff3150c4cd5cb1a..771383150f2b26bb6e912b68b2c40e3c35832e19 100644 (file)
--- a/qemu.spec
+++ b/qemu.spec
@@ -1,6 +1,5 @@
 # TODO:
-# libpmem (x86_64 only?)
-# plugins?
+# plugins? (probes)
 #
 # Conditional build:
 %bcond_without sdl             # SDL UI and audio support
 %bcond_without iscsi           # iscsi support
 %bcond_without libnfs          # NFS support
 %bcond_without multipath       # Multipath support
+%bcond_without pmem            # libpmem (persistent memory) support
 %bcond_without seccomp         # seccomp support
 %bcond_without usbredir        # usb network redirection support
 %bcond_without system_seabios  # system seabios binary
 %bcond_without snappy          # snappy compression library
 %bcond_without user_static     # build linux-user static packages
 %bcond_with    lttng           # lttng-ust trace backend support [needs update]
-%bcond_with    systemtap       # SystemTap/dtrace trace backend support
+%bcond_without systemtap       # SystemTap/dtrace trace backend support
 %bcond_without virgl           # build virgl support
 %bcond_with    vxhs            # Veritas HyperScale vDisk backend support (builtin; module not supported)
 %bcond_without xkbcommon       # xkbcommon support
 %ifarch x32
 %undefine      with_xen
 %endif
+%ifnarch %{x8664} aarch64
+%undefine      with_pmem
+%endif
 
 Summary:       QEMU CPU Emulator
 Summary(pl.UTF-8):     QEMU - emulator procesora
 Name:          qemu
 Version:       5.0.0
-Release:       1
+Release:       3
 License:       GPL v2, BSD (edk2 firmware files)
 Group:         Applications/Emulators
 Source0:       https://download.qemu.org/%{name}-%{version}.tar.xz
@@ -61,6 +64,8 @@ Source11:     %{name}-guest-agent.service
 Source12:      99-%{name}-guest-agent.rules
 Source13:      %{name}-guest-agent.init
 Source14:      %{name}-guest-agent.logrotate
+Source15:      %{name}-pr-helper.service
+Source16:      %{name}-pr-helper.socket
 Patch0:                %{name}-cflags.patch
 Patch1:                %{name}-whitelist.patch
 Patch2:                %{name}-user-execve.patch
@@ -123,6 +128,7 @@ BuildRequires:      perl-Encode
 BuildRequires: perl-tools-pod
 BuildRequires: pixman-devel >= 0.21.8
 BuildRequires: pkgconfig
+%{?with_pmem:BuildRequires:    pmdk-devel}
 %{?with_pulseaudio:BuildRequires:      pulseaudio-devel}
 BuildRequires: python3 >= 1:3.5
 BuildRequires: rpmbuild(macros) >= 1.644
@@ -144,8 +150,9 @@ BuildRequires:      vde2-devel
 BuildRequires: which
 %{?with_virgl:BuildRequires:   virglrenderer-devel}
 %{?with_vte:BuildRequires:     vte-devel >= 0.32.0}
-# xencontrol xenstore xenguest xenforeignmemory xengnttab xenevtchn xendevicemodel [xentoolcore for xen 4.10+]
-%{?with_xen:BuildRequires:     xen-devel >= 4.2}
+# xencontrol xenstore xenguest xenforeignmemory xengnttab xenevtchn xendevicemodel; xentoolcore for xen 4.10+
+# min version is 4.2, more features up to 4.10
+%{?with_xen:BuildRequires:     xen-devel >= 4.10}
 BuildRequires: xfsprogs-devel
 %{?with_xkbcommon:BuildRequires:       xorg-lib-libxkbcommon-devel}
 BuildRequires: xorg-lib-libX11-devel
@@ -928,6 +935,19 @@ QEMU SDL UI and audio driver.
 %description module-ui-sdl -l pl.UTF-8
 Sterownik interfejsu użytkownika i dźwięku SDL dla QEMU.
 
+%package -n systemtap-qemu
+Summary:       systemtap/dtrace probes for QEMU
+Summary(pl.UTF-8):     Sondy systemtap/dtrace dla QEMU
+Group:         Development/Tools
+Requires:      %{name}-common = %{version}-%{release}
+Requires:      systemtap-client
+
+%description -n systemtap-qemu
+systemtap/dtrace probes for QEMU.
+
+%description -n systemtap-qemu -l pl.UTF-8
+Sondy systemtap/dtrace dla QEMU.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -938,9 +958,12 @@ Sterownik interfejsu użytkownika i dźwięku SDL dla QEMU.
 %patch5 -p1
 %patch6 -p1
 
-# workaround for conflict with alsa/error.h
-ln -s ../error.h qapi/error.h
+%{__sed} -i '1s,/usr/bin/env python3,%{__python3},' scripts/qemu-trace-stap
 
+%if %{with systemtap}
+# don't require stap binary during build
+%{__sed} -i -e "s/has 'stap'/true/" configure
+%endif
 %build
 
 build() {
@@ -988,6 +1011,7 @@ build dynamic \
        %{!?with_gtk3:--disable-gtk} \
        %{__enable_disable iscsi libiscsi} \
        %{__enable_disable libnfs} \
+       %{__enable_disable pmem libpmem} \
        --enable-lzo \
        %{__enable_disable multipath mpath} \
        --enable-modules \
@@ -1027,11 +1051,12 @@ build static \
        --disable-guest-agent \
        --disable-guest-agent-msi \
        --disable-libnfs \
+       --disable-linux-io-uring \
        --disable-mpath \
        --disable-nettle \
        --disable-pie \
        --disable-sdl \
-       --enable-slirp=internal \
+       --disable-slirp \
        --disable-spice \
        --disable-system \
        --disable-tcmalloc \
@@ -1039,6 +1064,7 @@ build static \
        --disable-vxhs \
        --enable-user \
        --disable-xkbcommon \
+       --disable-zstd \
        --static
 %endif
 
@@ -1047,8 +1073,8 @@ build static \
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/usr/lib/binfmt.d} \
-       $RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d,rc.d/init.d,logrotate.d} \
-       $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}}
+       $RPM_BUILD_ROOT/etc/{qemu,sysconfig,modules-load.d,rc.d/init.d,logrotate.d} \
+       $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,/lib/udev/rules.d,%{_sbindir}}
 
 %if %{with user_static}
 %{__make} -C build-static install \
@@ -1081,7 +1107,7 @@ install -p qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl/qemu.conf
 
 %ifarch %{ix86} %{x8664} x32
 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/modules-load.d/kvm.conf
-install -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
+install -p %{SOURCE4} $RPM_BUILD_ROOT/lib/udev/rules.d
 %endif
 
 install -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/ksm.service
@@ -1095,11 +1121,13 @@ install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
 # For the qemu-guest-agent subpackage install the systemd
 # service and udev rules.
 install -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
-install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
+install -p %{SOURCE12} $RPM_BUILD_ROOT/lib/udev/rules.d
 
 install -p %{SOURCE13} $RPM_BUILD_ROOT/etc/rc.d/init.d/qemu-ga
 install -p %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/qemu-ga
 
+cp -p %{SOURCE15} %{SOURCE16} $RPM_BUILD_ROOT%{systemdunitdir}
+
 # Install binfmt
 BINFMT_CPUS=" \
 %ifnarch %{ix86} %{x8664} x32
@@ -1219,6 +1247,7 @@ fi
 %triggerpostun common -- qemu-common < 1.6.1-4
 %systemd_trigger ksm.service
 %systemd_trigger ksmtuned.service
+%systemd_trigger qemu-pr-helper.service
 
 %post user
 %systemd_service_restart systemd-binfmt.service
@@ -1261,6 +1290,8 @@ fi
 %attr(640,root,qemu) %config(noreplace) %verify(not md5 mtime size) /etc/qemu/bridge.conf
 %{systemdunitdir}/ksm.service
 %{systemdunitdir}/ksmtuned.service
+%{systemdunitdir}/qemu-pr-helper.service
+%{systemdunitdir}/qemu-pr-helper.socket
 %attr(755,root,root) %{_bindir}/elf2dmp
 %attr(755,root,root) %{_bindir}/ivshmem-client
 %attr(755,root,root) %{_bindir}/ivshmem-server
@@ -1400,6 +1431,7 @@ fi
 %attr(755,root,root) %{_bindir}/qemu-x86_64-static
 %attr(755,root,root) %{_bindir}/qemu-xtensa-static
 %attr(755,root,root) %{_bindir}/qemu-xtensaeb-static
+%attr(755,root,root) %{_bindir}/qemu-trace-stap-static
 %endif
 
 %files system-aarch64
@@ -1526,7 +1558,7 @@ fi
 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
 %ifarch %{ix86} %{x8664} x32
 %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/kvm.conf
-%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/80-kvm.rules
+/lib/udev/rules.d/80-kvm.rules
 %endif
 %{_datadir}/%{name}/bios.bin
 %{_datadir}/%{name}/bios-256k.bin
@@ -1577,11 +1609,11 @@ fi
 
 %files guest-agent
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/99-qemu-guest-agent.rules
+%attr(755,root,root) %{_bindir}/qemu-ga
+/lib/udev/rules.d/99-qemu-guest-agent.rules
 %{systemdunitdir}/qemu-guest-agent.service
 %attr(754,root,root) /etc/rc.d/init.d/qemu-ga
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/qemu-ga
-%attr(755,root,root) %{_bindir}/qemu-ga
 %{_mandir}/man7/qemu-ga-ref.7*
 %{_mandir}/man8/qemu-ga.8*
 
@@ -1629,3 +1661,11 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/audio-sdl.so
 %attr(755,root,root) %{_libdir}/%{name}/ui-sdl.so
 %endif
+
+%if %{with systemtap}
+%files -n systemtap-qemu
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/qemu-trace-stap
+%{_datadir}/systemtap/tapset/qemu-*.stp
+%{_mandir}/man1/qemu-trace-stap.1*
+%endif
This page took 0.716563 seconds and 4 git commands to generate.