public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Richard W.M. Jones <rjones@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libguestfs] f44: Fix location of qemu on ELN
Date: Fri, 03 Jul 2026 09:07:29 GMT	[thread overview]
Message-ID: <178306964970.1.10230105221828902234.rpms-libguestfs-3af473877379@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-07-03  9:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178306964970.1.10230105221828902234.rpms-libguestfs-3af473877379@fedoraproject.org \
    --to=rjones@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox