]> xenbits.xensource.com Git - libvirt.git/commitdiff
specfile: require passt for the build if fedora >= 36 or rhel >= 9
authorLaine Stump <laine@redhat.com>
Fri, 6 Jan 2023 23:36:44 +0000 (18:36 -0500)
committerLaine Stump <laine@redhat.com>
Tue, 10 Jan 2023 06:19:27 +0000 (01:19 -0500)
The only reason we need it at build time is to find its location in
$PATH so it can be hardcoded into the libvirt binary (and avoid the
possibility of someone adding in a malicious binary somewhere earlier
in the path, I guess).

Only 'recommend' passt during installation though, since it is not
needed unless someone is actually using it.

There is no need to add in a build-time "WITH_PASST" option (IMO),
since it adds very little to the size of the code - "PASST" (the path
to the binary) will just be set to "passt", so if someone does manage
to build and install passt on an older version of Fedora or RHEL, it
will still work (as long as it's installed somewhere in the path).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
libvirt.spec.in

index 6b8acf252e5610ca4e8afe5c33a4e84a408d5a08..d9529fc76c4a7b15d4b8bcedc3bae9d969803310 100644 (file)
@@ -347,6 +347,9 @@ BuildRequires: libssh2-devel >= 1.3.0
 %if %{with_netcf}
 BuildRequires: netcf-devel >= 0.2.2
 %endif
+%if (0%{?fedora} >= 36) || (0%{?rhel} >= 9)
+BuildRequires: passt
+%endif
 %if %{with_esx}
 BuildRequires: libcurl-devel
 %endif
@@ -717,6 +720,9 @@ Requires: lzop
 Requires: xz
 Requires: systemd-container
 Requires: swtpm-tools
+    %if (0%{?fedora} >= 36) || (0%{?rhel} >= 9)
+Recommends: passt
+    %endif
 
 %description daemon-driver-qemu
 The qemu driver plugin for the libvirtd daemon, providing
@@ -1968,6 +1974,7 @@ exit 0
 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
 %ghost %dir %{_rundir}/libvirt/qemu/
 %ghost %dir %{_rundir}/libvirt/qemu/dbus/
+%ghost %dir %{_rundir}/libvirt/qemu/passt/
 %ghost %dir %{_rundir}/libvirt/qemu/slirp/
 %ghost %dir %{_rundir}/libvirt/qemu/swtpm/
 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/