From nobody Sun Feb 8 14:31:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621929682; cv=none; d=zohomail.com; s=zohoarc; b=DiFixMbp04eSx/QcT+5W6H6CGKseRYZ8ULzcB0tc341XlQNc3jXW5J8YaqkgF7v4ZGzx1a9hlQymzwWI5cQBa/a/7Zd+Vih8iGO2Ixzh6HwJJ2FwvLmN4gF1u6fgrftkHSm1IzQqWiV2Zv8hXs3wYNWfpR/16lJcQZGNsBdzZbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621929682; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qrskvKKPW1ZdLbeHmdnyCJ6q7/jXoC2nPRepVH++KZc=; b=f5miQSSqnFTimeb+KRT0LrP7eJbbVA8s9Z58/aCXT7mCP/Wm2BJVDYY+x4LJ2Ya+Jxpy3y5GIfY8nxRP7cIdgq03Wct4oSHGXTN6/HkSMJyIaAFCuvcY1QF3zQv3Ehj4fzf/+1RnT/kQeN0VMOEYIULaAQeLZeYRlb3T+y/E27E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1621929682630971.1753531877433; Tue, 25 May 2021 01:01:22 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-525-_XFTHHUKN_qZ9Jc3tlEp9g-1; Tue, 25 May 2021 04:01:07 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE68A6D5C4; Tue, 25 May 2021 08:01:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F8B85D9D3; Tue, 25 May 2021 08:01:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5F9AB55345; Tue, 25 May 2021 08:01:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14P80oF4021812 for ; Tue, 25 May 2021 04:00:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2D29B19CBC; Tue, 25 May 2021 08:00:50 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.193.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id A280918AD4 for ; Tue, 25 May 2021 08:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621929681; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qrskvKKPW1ZdLbeHmdnyCJ6q7/jXoC2nPRepVH++KZc=; b=Uz52aGwjSjCUIdOnCHsct8Elfag0OTW3qA4jAOiZSd790Gt3Le3dSNxB0dH83fuS7GttD5 brOc6Rm2CzTBrvksK+SfEbnEzgG5ML2VAIAfPQ7UaohnkgX4tGw8MIKgs6t1xX2zWCkM1h zjs7MbeP+2llKAPmObqT5uHTYFJXOkc= X-MC-Unique: _XFTHHUKN_qZ9Jc3tlEp9g-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [PATCH RESEND v3 2/8] qemu_conf: use virFindFileInPathFull for runtime binaries Date: Tue, 25 May 2021 10:00:41 +0200 Message-Id: <15bc43b595af1dfc41ef4d5a494b117a818a37f1.1621929489.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Following patches will stop detecting the full path during compilation so we will need to do it here. Signed-off-by: Pavel Hrdina Reviewed-by: Andrea Bolognani --- src/qemu/qemu_conf.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 916a3d36ee..437b3ce2be 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -109,6 +109,12 @@ virQEMUDriverConfig *virQEMUDriverConfigNew(bool privi= leged, const char *root) { g_autoptr(virQEMUDriverConfig) cfg =3D NULL; + const char *qemu_extra_paths[] =3D { + "/usr/libexec", + "/usr/lib/qemu", + "/usr/lib", + NULL, + }; =20 if (virQEMUConfigInitialize() < 0) return NULL; @@ -267,10 +273,14 @@ virQEMUDriverConfig *virQEMUDriverConfigNew(bool priv= ileged, return NULL; } =20 - cfg->bridgeHelperName =3D g_strdup(QEMU_BRIDGE_HELPER); - cfg->prHelperName =3D g_strdup(QEMU_PR_HELPER); - cfg->slirpHelperName =3D g_strdup(QEMU_SLIRP_HELPER); - cfg->dbusDaemonName =3D g_strdup(QEMU_DBUS_DAEMON); + cfg->bridgeHelperName =3D virFindFileInPathFull(QEMU_BRIDGE_HELPER, + (GStrv) qemu_extra_paths= ); + cfg->prHelperName =3D virFindFileInPathFull(QEMU_PR_HELPER, + (GStrv) qemu_extra_paths); + cfg->slirpHelperName =3D virFindFileInPathFull(QEMU_SLIRP_HELPER, + (GStrv) qemu_extra_paths); + cfg->dbusDaemonName =3D virFindFileInPathFull(QEMU_DBUS_DAEMON, + (GStrv) qemu_extra_paths); =20 cfg->securityDefaultConfined =3D true; cfg->securityRequireConfined =3D false; --=20 2.31.1