public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libguestfs] f44: Fix location of qemu on ELN
@ 2026-07-03 9:07 Richard W.M. Jones
0 siblings, 0 replies; only message in thread
From: Richard W.M. Jones @ 2026-07-03 9:07 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/libguestfs
Branch : f44
Commit : 3af47387737910f16969910a10c97e6b5b250699
Author : Richard W.M. Jones <rjones@redhat.com>
Date : 2026-05-19T08:37:30+01:00
Stats : +38/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/libguestfs/c/3af47387737910f16969910a10c97e6b5b250699?branch=f44
Log:
Fix location of qemu on ELN
---
diff --git a/0001-RHEL-Use-alternate-location-for-qemu-kvm-in-direct-b.patch b/0001-RHEL-Use-alternate-location-for-qemu-kvm-in-direct-b.patch
new file mode 100644
index 0000000..412d05c
--- /dev/null
+++ b/0001-RHEL-Use-alternate-location-for-qemu-kvm-in-direct-b.patch
@@ -0,0 +1,30 @@
+From f7143b63d106bfab2ec8198932fb8ceeba502b23 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Tue, 17 Mar 2026 20:14:16 +0000
+Subject: [PATCH] RHEL: Use alternate location for qemu-kvm in direct backend
+
+We don't have to change the libvirt backend since libvirt knows where
+to find qemu on RHEL.
+---
+ lib/launch-direct.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/launch-direct.c b/lib/launch-direct.c
+index b2021ee2c..12f969c7e 100644
+--- a/lib/launch-direct.c
++++ b/lib/launch-direct.c
+@@ -446,6 +446,11 @@ free_pid_path:
+ static const char *
+ get_default_hv_direct (guestfs_h *g, void *datav)
+ {
++ /* RHEL puts qemu in a strange place. */
++ static const char rhel_qemu[] = "/usr/libexec/qemu-kvm";
++ if (access (rhel_qemu, X_OK) == 0)
++ return rhel_qemu;
++
+ if (host_cpu[0] == 'i' && strchr ("3456", host_cpu[1]) &&
+ host_cpu[2] == '8' && host_cpu[3] == '6' && host_cpu[4] == '\0')
+ return "qemu-system-i386";
+--
+2.53.0
+
diff --git a/libguestfs.spec b/libguestfs.spec
index 5051a9b..248b091 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -72,6 +72,9 @@ Source8: copy-patches.sh
# For applying patches:
BuildRequires: git
+# RHEL-only patch because the location of qemu is different.
+Patch1000: 0001-RHEL-Use-alternate-location-for-qemu-kvm-in-direct-b.patch
+
BuildRequires: autoconf, automake, libtool, gettext-devel
# Basic build requirements.
@@ -622,7 +625,11 @@ for %{name}.
%if 0%{verify_tarball_signature}
%{gpgverify} --keyring='%{SOURCE7}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%endif
-%autosetup -S git -p1
+%autosetup -S git -N
+%autopatch -p1 -M 999
+%if 0%{?rhel}
+%autopatch -p1 -m 1000
+%endif
# ACLOCAL_PATH is temporarily required to work around
# https://bugzilla.redhat.com/show_bug.cgi?id=2366708
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-03 9:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-03 9:07 [rpms/libguestfs] f44: Fix location of qemu on ELN Richard W.M. Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox