From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925330; cv=none; d=zohomail.com; s=zohoarc; b=aGEi0eimEANuU04MDCqQaJHSRsEbMqP2aOKC6zON5U5Qnqa+ecweQAXxHvDuHiSMEndFmJ+Mv040nXWRN72r4GexM1xWeagQybOU9rI4Nxc7biMhNm+fvzPZ+xYZMVlv8uF9vf0fepei0Y8zzkPPePNcjwszQ/H0YiAc0rDfVLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925330; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=GOK2U1kQmtFme43Y6v3/GMROqaxc2DEoUJoE+2yUx3o=; b=b7In3k/TaawTjGxW+1SMfyWuC1gUWsuHZgw94pwtNuC62SgbXtvGb/EusXa5t0L2dzybAjMwR823qtMANYIvy2d3PAcFpuwwUiTBP2fuUScd9V8NViXCrwkhT9FCYKxgplwQDngnzl8aTGb4gW+xXeDknzW+w9W7BnBXkWL66I4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925330646192.9745119489471; Tue, 29 Apr 2025 04:15:30 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9B0821452; Tue, 29 Apr 2025 07:15:29 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 9C0C41274; Tue, 29 Apr 2025 07:14:31 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0855D121D; Tue, 29 Apr 2025 07:14:28 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 866BF11F1 for ; Tue, 29 Apr 2025 07:14:27 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-277-qKUlpNI9MF6_Eej4RelswQ-1; Tue, 29 Apr 2025 07:14:25 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A78761800446 for ; Tue, 29 Apr 2025 11:14:23 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D244F195608D; Tue, 29 Apr 2025 11:14:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GdPuW7Wjrw9V9E3pxh7gUXiyZyN/jwSpwMXPcDVgxCM=; b=B7T4dxKYFmEjjvctgXOjA0QPpj43zSzaEzYpdODRuufkeWpYehMRbMYUQw/LVqFWTVlMS5 FgC33zm9eaGWuAdkXO23OD5tPYc/APRsjEorGjiOwQs4DjbCqNCZr7lP7QvL+WIy2CJ6jI xUTCmgJWL1CiqztuXRHF36npExZSNsk= X-MC-Unique: qKUlpNI9MF6_Eej4RelswQ-1 X-Mimecast-MFC-AGG-ID: qKUlpNI9MF6_Eej4RelswQ_1745925263 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 01/20] storage: stop hardcoding paths for mkfs, mount, umount Date: Tue, 29 Apr 2025 12:14:01 +0100 Message-ID: <20250429111420.1748521-2-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: MM3eXxV_9AgSEAIZcbrvAUny_ZLKGloAG-a8oEHSDo4_1745925263 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HLNG6CMWXVTT744K6VYDZP2RHYWE25XZ X-Message-ID-Hash: HLNG6CMWXVTT744K6VYDZP2RHYWE25XZ X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925333582019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 This was always undesirable but now causes problems on Fedora 42 where at build time we detect a /sbin path but at runtime this will only exist on upgraded machines, not fresh installs. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 13 ------------- src/storage/storage_backend_fs.c | 17 +++-------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/meson.build b/meson.build index 37b1caa566..14c98b49a1 100644 --- a/meson.build +++ b/meson.build @@ -1827,23 +1827,10 @@ if conf.has('WITH_LIBVIRTD') endif endif =20 - if fs_enable - mount_prog =3D find_program('mount', required: get_option('storage_f= s'), dirs: libvirt_sbin_path) - umount_prog =3D find_program('umount', required: get_option('storage= _fs'), dirs: libvirt_sbin_path) - mkfs_prog =3D find_program('mkfs', required: get_option('storage_fs'= ), dirs: libvirt_sbin_path) - - if not mount_prog.found() or not umount_prog.found() or not mkfs_pro= g.found() - fs_enable =3D false - endif - endif - if fs_enable use_storage =3D true =20 conf.set('WITH_STORAGE_FS', 1) - conf.set_quoted('MOUNT', mount_prog.full_path()) - conf.set_quoted('UMOUNT', umount_prog.full_path()) - conf.set_quoted('MKFS', mkfs_prog.full_path()) endif endif =20 diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend= _fs.c index fce395d60f..6ec359625a 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -304,7 +304,7 @@ virStorageBackendFileSystemMount(virStoragePoolObj *poo= l) if (!(src =3D virStorageBackendFileSystemGetPoolSource(pool))) return -1; =20 - cmd =3D virStorageBackendFileSystemMountCmd(MOUNT, def, src); + cmd =3D virStorageBackendFileSystemMountCmd("mount", def, src); =20 /* Mounting a shared FS might take a long time. Don't hold * the pool locked meanwhile. */ @@ -362,7 +362,7 @@ virStorageBackendFileSystemStop(virStoragePoolObj *pool) if ((rc =3D virStorageBackendFileSystemIsMounted(pool)) !=3D 1) return rc; =20 - cmd =3D virCommandNewArgList(UMOUNT, def->target.path, NULL); + cmd =3D virCommandNewArgList("umount", def->target.path, NULL); return virCommandRun(cmd, NULL); } #endif /* WITH_STORAGE_FS */ @@ -402,18 +402,7 @@ virStorageBackendExecuteMKFS(const char *device, g_autoptr(virCommand) cmd =3D NULL; g_autofree char *mkfs =3D NULL; =20 -#if WITH_STORAGE_FS - mkfs =3D virFindFileInPath(MKFS); -#endif /* WITH_STORAGE_FS */ - - if (!mkfs) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("mkfs is not available on this platform: Failed t= o make filesystem of type '%1$s' on device '%2$s'"), - format, device); - return -1; - } - - cmd =3D virCommandNewArgList(mkfs, "-t", format, NULL); + cmd =3D virCommandNewArgList("mkfs", "-t", format, NULL); =20 /* use the force, otherwise mkfs.xfs won't overwrite existing fs. * Similarly mkfs.ext2, mkfs.ext3, and mkfs.ext4 require supplying -F --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925351; cv=none; d=zohomail.com; s=zohoarc; b=nPJf7Iskqj2kcodMm6RhEX/RvVY3nKvft7AzTOhsx5NMPmoKjx54igqBMFg096/FJ8iW/aQe7qZ0DFbkzWXqPwjPv6uxW5FwBPymhabqMkw75uIBl4zVPGdqrPpvIdyhpNcTNATXw8POpNwP4KSCk8FKEGGPbCs4gbdseGtEAMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925351; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=4oiGNOZb+vrpRHQWPV9gmMHRcV03pLj6Jrnb6RghokI=; b=JqPfzWxUmBmqIb5pyj8A3wu0HC1Tzm3mnxHv/KI7EPiXiI0AHxlyFnWqxPrpbdhaD184pYEnL2w3Kbwfo6Lw0qUrqqNrnPjysHgv9VQfLr35j8NtsdPosJ6CMLmtV1QcKsIehCG4DcO8i8jWOv3eJ3Me+5UjlnVZXanBkGT+3Uk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925351422525.1401490212588; Tue, 29 Apr 2025 04:15:51 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7666E1405; Tue, 29 Apr 2025 07:15:50 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 4A17613EC; Tue, 29 Apr 2025 07:14:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id A530E11F1; Tue, 29 Apr 2025 07:14:28 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4953F11F1 for ; Tue, 29 Apr 2025 07:14:28 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-495-4BTvg_uzOLmInqT6DEFP8w-1; Tue, 29 Apr 2025 07:14:25 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF1C81956086 for ; Tue, 29 Apr 2025 11:14:24 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2332D195608D; Tue, 29 Apr 2025 11:14:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IEFwtEs7TTFageTfPuCdGaUtTlh6sh3gMbav5oOEBrM=; b=cfiemj/cSsgonyF9aGLVsIl5INc1SAZ04aWVW0OqKnk9ZnURddatRHtykw5WSW1v9IcM81 1qDUCPwFvsiaylw3qbBMw6otYFel2J12kBBD2fxpoEMMZvENQns8pAOlvONZKgQnvUrWpL ncof+6K3D6brVSaWIGmh9BhVDBNpGCg= X-MC-Unique: 4BTvg_uzOLmInqT6DEFP8w-1 X-Mimecast-MFC-AGG-ID: 4BTvg_uzOLmInqT6DEFP8w_1745925265 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 02/20] tests: storage hardcoding paths for mount & vgchange Date: Tue, 29 Apr 2025 12:14:02 +0100 Message-ID: <20250429111420.1748521-3-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: XhsKqIrbabwUZstvr-cT3fvbyxgGGb1ebOOBurJiP0U_1745925265 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7RTBLROLHKHKSH77ABGCKE7QAF5OH3ES X-Message-ID-Hash: 7RTBLROLHKHKSH77ABGCKE7QAF5OH3ES X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925354900019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 This is redundant since the tests will strip any path component from the binary name before comparison. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- tests/storagepoolxml2argvtest.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtes= t.c index e8e40d695e..d5c2531ab8 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -6,14 +6,6 @@ =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 -#ifndef MOUNT -# define MOUNT "/usr/bin/mount" -#endif - -#ifndef VGCHANGE -# define VGCHANGE "/usr/sbin/vgchange" -#endif - static int testCompareXMLToArgvFiles(bool shouldFail, const char *poolxml, @@ -46,12 +38,12 @@ testCompareXMLToArgvFiles(bool shouldFail, goto cleanup; } =20 - cmd =3D virStorageBackendFileSystemMountCmd(MOUNT, def, src); + cmd =3D virStorageBackendFileSystemMountCmd("mount", def, src); def =3D NULL; break; =20 case VIR_STORAGE_POOL_LOGICAL: - cmd =3D virStorageBackendLogicalChangeCmd(VGCHANGE, def, true); + cmd =3D virStorageBackendLogicalChangeCmd("vgchange", def, true); break; =20 case VIR_STORAGE_POOL_DIR: --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925375; cv=none; d=zohomail.com; s=zohoarc; b=iKJf24lVfW4spzttS5NI7quzhb2WDW97x9SM9nyyrUqoKXaERWr0JQ61glwzBl0aDxGQyCsCcTpWDS089FpvnObWedqgO54ivjtvxq/ISqu2KgZkxgXvYEZVVPamxh0S8KUV/UDxLCb4yTtPwClcGqvwVVftQlfWgMRb8WEFvkw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925375; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=ofkrJ+rJxutJ1h8SnwH5g5ayhfR30PeDKMh9dhlDT5g=; b=VRwDrYWKCVHEhIlJSoZihyrm76qCOG0Qb3fNcAnBmLO9dMnWouH3K7tRFQGkZ6V3dnPL4HAuFEyfWJgoIEbj0nVhAPRR3BiyPNFLz7OS0LwC0CHWrEtUZx1bmjWBT3fh7v7WM44w4YfO8byDYYOhhDeZWVmKrnunrL5/bXiJAok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174592537568921.56155100175772; Tue, 29 Apr 2025 04:16:15 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BE4E913C9; Tue, 29 Apr 2025 07:16:14 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 03C16130D; Tue, 29 Apr 2025 07:14:37 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D119111C8; Tue, 29 Apr 2025 07:14:28 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6CF2F11C8 for ; Tue, 29 Apr 2025 07:14:28 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-9lSlHxZyPWKtH4AqTqUADQ-1; Tue, 29 Apr 2025 07:14:26 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1D622180087A for ; Tue, 29 Apr 2025 11:14:26 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 49559195608D; Tue, 29 Apr 2025 11:14:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WxzjIuUqFbaFGofLPekNkGx2999S+ma38zuxdZOX/C4=; b=Idc0xbbYFDJyonB8gsmfTfbrZOvU3aTUjJHE6tLFkL/2+KBT7C61tzxfhtrZaRPlySVavi OMemUaOOvg3G5c6RhC76mlC+g9yr3H2ovZHBoZMCYZbOq7DtzvQbmlAoHVswZgnQUciufF RWChDrt65KKKVPRmGPm11YMUmld+4sA= X-MC-Unique: 9lSlHxZyPWKtH4AqTqUADQ-1 X-Mimecast-MFC-AGG-ID: 9lSlHxZyPWKtH4AqTqUADQ_1745925266 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 03/20] util: stop hardcoding numad path Date: Tue, 29 Apr 2025 12:14:03 +0100 Message-ID: <20250429111420.1748521-4-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Uyi7LX_-3PZU6cLEQdKg2IzaX0Kymc0NT_X-IodovwM_1745925266 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CTUJUZK5IRD4N6BBNJZLHMIRLCS7NXM4 X-Message-ID-Hash: CTUJUZK5IRD4N6BBNJZLHMIRLCS7NXM4 X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925377609019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Change the meson rules to always enable numad if on a Linux host, unless the meson options say not to. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 10 +++------- src/util/virnuma.c | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 14c98b49a1..767205f44b 100644 --- a/meson.build +++ b/meson.build @@ -2028,14 +2028,10 @@ if not get_option('nss').disabled() endif endif =20 -if not get_option('numad').disabled() and numactl_dep.found() - numad_prog =3D find_program('numad', required: get_option('numad'), dirs= : libvirt_sbin_path) - if numad_prog.found() - conf.set('WITH_NUMAD', 1) - conf.set_quoted('NUMAD', numad_prog.full_path()) - endif +if not get_option('numad').disabled() and numactl_dep.found() and host_mac= hine.system() =3D=3D 'linux' + conf.set('WITH_NUMAD', 1) elif get_option('numad').enabled() - error('You must have numactl enabled for numad support.') + error('You must have a Linux host with numactl enabled for numad support= .') endif =20 # nwfilter should only be compiled for linux, and only if the diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 9393c20875..67c51630c7 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -61,7 +61,7 @@ virNumaGetAutoPlacementAdvice(unsigned short vcpus, g_autoptr(virCommand) cmd =3D NULL; char *output =3D NULL; =20 - cmd =3D virCommandNewArgList(NUMAD, "-w", NULL); + cmd =3D virCommandNewArgList("numad", "-w", NULL); virCommandAddArgFormat(cmd, "%d:%llu", vcpus, VIR_DIV_UP(balloon, 1024)); =20 --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925405; cv=none; d=zohomail.com; s=zohoarc; b=WaVJO7TWjMp4r8RGrb+cpbNmcd3PJkdqf4+FONseF1re/w1XrqO/Ld+xsPyI/qV/TEc01a1T6WZ0/yvyiiCDAY33EHsLkZPdPvnzvuu2rlryspQ6nmP8bCejJnOgUM+7uoMX6LTAgC2pMcz5iYAVCiOgDmXpa0Xjn+5hnG89D6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925405; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=PvVuwpZUAKStBnAKM747BgJBOCo4232TUI+Od6ttH8I=; b=Cb90s7+UUngQei/GKLMLZgLyvpTdTYTqdMQWe70lLDf6c6I1b3fHU9eoRCpMAqB29uAuzLzv0O5LZZv2IgMbZTfkhdrd2VQmeMOQIM9RD8H6XpQn6U0uAG0BMpWSbuwPPuKOG9TBsrOmtY2oudM/rRL+KVrQAc+lCNOTIf1IP00= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925405588823.4135689973397; Tue, 29 Apr 2025 04:16:45 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 94A4712CF; Tue, 29 Apr 2025 07:16:44 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2D4EF1410; Tue, 29 Apr 2025 07:14:39 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 4EE5411C8; Tue, 29 Apr 2025 07:14:30 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C7F3911C8 for ; Tue, 29 Apr 2025 07:14:29 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-296-7NujNy5GPwGv21YRnDbQ0w-1; Tue, 29 Apr 2025 07:14:28 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 54BE9180034A for ; Tue, 29 Apr 2025 11:14:27 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 73504195608D; Tue, 29 Apr 2025 11:14:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aGju6+OUmC9INZYqGMJY9W+Cl5dWl4BqFnOvkGS5kqA=; b=P2+2pmjpD+Is8TXQSnUa1n7pVHMYsG3dlb+EgPwscYihhBFcIjbHuEDHOiAfLaiuD8whtU 9YOLerQL7SyRwgac020W6VrPpMmYFa0+5zbihCjSxRbK1tuyHpfVKnQzYzEUGcr/qXO7sl QUz0w751p4hyV3hpUHBJ39MobtKrngQ= X-MC-Unique: 7NujNy5GPwGv21YRnDbQ0w-1 X-Mimecast-MFC-AGG-ID: 7NujNy5GPwGv21YRnDbQ0w_1745925267 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 04/20] util: stop hardcoding bhyve, bhyvectl, bhyveload paths Date: Tue, 29 Apr 2025 12:14:04 +0100 Message-ID: <20250429111420.1748521-5-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ZuWXgyIomDEkbeUoH8E35HjldeevHFzIycUzFIcUwVQ_1745925267 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: FQEY6YMWAPQUG65ROYGOEI6PS5LEGY42 X-Message-ID-Hash: FQEY6YMWAPQUG65ROYGOEI6PS5LEGY42 X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925407790019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Change the meson rules to always enable numad if on a FreeBSD host, unless the meson options say not to. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 11 +---------- src/bhyve/bhyve_command.c | 6 +++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/meson.build b/meson.build index 767205f44b..b0b6efee8e 100644 --- a/meson.build +++ b/meson.build @@ -1495,16 +1495,7 @@ if not get_option('driver_libvirtd').disabled() endif =20 if not get_option('driver_bhyve').disabled() and host_machine.system() =3D= =3D 'freebsd' - bhyve_prog =3D find_program('bhyve', required: get_option('driver_bhyve'= )) - bhyvectl_prog =3D find_program('bhyvectl', required: get_option('driver_= bhyve')) - bhyveload_prog =3D find_program('bhyveload', required: get_option('drive= r_bhyve')) - - if bhyve_prog.found() and bhyvectl_prog.found() and bhyveload_prog.found= () - conf.set('WITH_BHYVE', 1) - conf.set_quoted('BHYVE', bhyve_prog.full_path()) - conf.set_quoted('BHYVECTL', bhyvectl_prog.full_path()) - conf.set_quoted('BHYVELOAD', bhyveload_prog.full_path()) - endif + conf.set('WITH_BHYVE', 1) elif get_option('driver_bhyve').enabled() error('The bhyve driver cannot be enabled') endif diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 6578a4326c..44c66ea147 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -711,7 +711,7 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver,= virDomainDef *def, * -S 31,uart,stdio \ * vm0 */ - g_autoptr(virCommand) cmd =3D virCommandNew(BHYVE); + g_autoptr(virCommand) cmd =3D virCommandNew("bhyve"); size_t i; unsigned nusbcontrollers =3D 0; unsigned nisacontrollers =3D 0; @@ -884,7 +884,7 @@ virCommand * virBhyveProcessBuildDestroyCmd(struct _bhyveConn *driver G_GNUC_UNUSED, virDomainDef *def) { - virCommand *cmd =3D virCommandNew(BHYVECTL); + virCommand *cmd =3D virCommandNew("bhyvectl"); =20 virCommandAddArg(cmd, "--destroy"); virCommandAddArgPair(cmd, "--vm", def->name); @@ -907,7 +907,7 @@ virBhyveProcessBuildBhyveloadCmd(virDomainDef *def, vir= DomainDiskDef *disk) { virCommand *cmd; =20 - cmd =3D virCommandNew(BHYVELOAD); + cmd =3D virCommandNew("bhyveload"); =20 if (def->os.bootloaderArgs =3D=3D NULL) { VIR_DEBUG("bhyveload with default arguments"); --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925427; cv=none; d=zohomail.com; s=zohoarc; b=ANGuYd1jAG4IP717dLBB/+dpkHK2UI/RuAUFRCeJBIEJdT24wTOmn+cdnRdeBUCTm1RWErjClWlOLPJ0GFq/ndNXdaZ6GT2TWWp/6n+IyKiRpqqPbU+WMYAS0qTBhoTSpV8p9Nu9YobSY6/jYiltCwAEfC43XBcGjh7DP2Py1+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925427; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=RRtC2Ra7iTlyTgXSP04z31Q6Ce937/rDX3CKZtG3Kxo=; b=fD1tw/zlOfYhAcqf8uhAVY6gghNysTlly/PFcR86y/AUxjGB1eTFzRct0NIUE81qGdszMeyCO/MPE3n1Pwa1V91zQjcvYaVEH1ESF9k9WUxPDN4qdv1FD+p1/bT21KyzmFT/LdrmSnJWf57uS9kZby0wZYEPSR93vxZYJ48wFrM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925427332988.3181142117571; Tue, 29 Apr 2025 04:17:07 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 99AFD92A; Tue, 29 Apr 2025 07:17:06 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 0A58D1369; Tue, 29 Apr 2025 07:14:42 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id DC5A61406; Tue, 29 Apr 2025 07:14:37 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 1B5CA12B7 for ; Tue, 29 Apr 2025 07:14:31 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-592-HSUjHYyvPBuHf2pey8uPJA-1; Tue, 29 Apr 2025 07:14:29 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 74C561800373 for ; Tue, 29 Apr 2025 11:14:28 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A02EA195608D; Tue, 29 Apr 2025 11:14:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r87jXlmisYdyubp3VigatoJ4ofBCuObO8yUnNns9L6c=; b=NuGfCSZLYaqLwVyYIjkCrkKO7LtzMH8BLIoGKyurnrcTuAvUvFJ217urWvj6otM8s+VUMD W5tWPaoWW0M6tYR0zWT+IYlOQTdukMRzQwxjohAvOTOkQ7jGoizlbNBKtD/memXhFakwhZ TBPSkBXWNbkwcWpAcPwiiMDUwfvbons= X-MC-Unique: HSUjHYyvPBuHf2pey8uPJA-1 X-Mimecast-MFC-AGG-ID: HSUjHYyvPBuHf2pey8uPJA_1745925268 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 05/20] util: stop hardcoding 'ifconfig' path Date: Tue, 29 Apr 2025 12:14:05 +0100 Message-ID: <20250429111420.1748521-6-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7qc2ndqIfC9cqW0g4PNsdGiyq3f_9eNZekaiKi2rbgc_1745925268 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CNWIVE6P5TRUI2GPGTQNCBTIQT2RRZOY X-Message-ID-Hash: CNWIVE6P5TRUI2GPGTQNCBTIQT2RRZOY X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925427818019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Change the source to assume use of 'ifconfig' on FreeBSD builds, allowing virCommand to report missing commands at runtime. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 4 ---- src/util/virnetdevip.c | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index b0b6efee8e..ea3e752f93 100644 --- a/meson.build +++ b/meson.build @@ -837,10 +837,6 @@ required_programs =3D [ 'xsltproc', ] =20 -if host_machine.system() =3D=3D 'freebsd' - required_programs +=3D 'ifconfig' -endif - foreach name : required_programs prog =3D find_program(name, dirs: libvirt_sbin_path) varname =3D name.underscorify() diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index f365c1999c..f7a7db620d 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -390,8 +390,8 @@ virNetDevIPAddrAdd(const char *ifname, return -1; } =20 -# ifdef IFCONFIG - cmd =3D virCommandNew(IFCONFIG); +# ifdef __FreeBSD__ + cmd =3D virCommandNew("ifconfig"); virCommandAddArg(cmd, ifname); if (VIR_SOCKET_ADDR_IS_FAMILY(addr, AF_INET6)) virCommandAddArg(cmd, "inet6"); @@ -431,8 +431,8 @@ virNetDevIPAddrDel(const char *ifname, =20 if (!(addrstr =3D virSocketAddrFormat(addr))) return -1; -# ifdef IFCONFIG - cmd =3D virCommandNew(IFCONFIG); +# ifdef __FreeBSD__ + cmd =3D virCommandNew("ifconfig"); virCommandAddArg(cmd, ifname); if (VIR_SOCKET_ADDR_IS_FAMILY(addr, AF_INET6)) virCommandAddArg(cmd, "inet6"); --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925445; cv=none; d=zohomail.com; s=zohoarc; b=bA/NRb4yi2b9azLgWW6CH+SEVMb5jUk/Ch/+oRP/s2LI+WJ+4eqTzwqYLOF5831VFkG/gJ2SHUZJ97Veapk7iQS3+KCGMwOndt6CS6Db+QChMYe7+fJW/zQEgJIU7vXYKsNhsh83Z9WvwIEcDA3Uz/D60y3TIhiUPVNYKxZCdeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925445; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=be1D8Vxrv41lQqtuiK3ABxgSM11mPKjoSiPY9Vix2RI=; b=h48Gn9nsPyf+vCuq9gW6nstHG0d10b8x/phkAbRzqc6UcR6cCd7EoyBigIncBSKWQgWyprHMVl+7qLa/qt/MnNDIRUdnxQ8ooj6NsXYdW9S41L1aXlAxYoLUlot7EiNnGZqQcIEcoRPN+Df0V2n8KgALjcC5Yej6LHivY4vOukI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925445335312.69290245710715; Tue, 29 Apr 2025 04:17:25 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5FB9213A4; Tue, 29 Apr 2025 07:17:24 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E1EC5141F; Tue, 29 Apr 2025 07:14:45 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 409251393; Tue, 29 Apr 2025 07:14:41 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 1CA53136D for ; Tue, 29 Apr 2025 07:14:32 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-GYSciQmTNWSdNWm_h3Qjmg-1; Tue, 29 Apr 2025 07:14:30 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9ACF81800875 for ; Tue, 29 Apr 2025 11:14:29 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CC3C7195608D; Tue, 29 Apr 2025 11:14:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eJwyEpG1aQhV3SFR4fAGAuno7yVok7k/EJaABeNU+Ws=; b=UTFgxp6a5VN4L1zn/3pum+MDo0ZDxWUSFLEtsOQlqNv+uO9S1wHisiTUdHf27ISCbJc01S 9Mp8MqpV3GJK7/jHlRbJu3GkhLo6At88k/WOQ2g9YAdHDxLTRWRFg1GOmQlAmPejl4lqjE jgSb7gwDlqQ6bLsWy1MpFw8aV+puJvA= X-MC-Unique: GYSciQmTNWSdNWm_h3Qjmg-1 X-Mimecast-MFC-AGG-ID: GYSciQmTNWSdNWm_h3Qjmg_1745925269 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 06/20] docs: stop setting vars for docs tools Date: Tue, 29 Apr 2025 12:14:06 +0100 Message-ID: <20250429111420.1748521-7-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: iZj4MJm3MGkUDB4at0pTCDGw0NwLHAQ4AYerCO1q6aU_1745925269 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: T5K273BOHMXCQ7EXOHQ52NBTHL3PPAML X-Message-ID-Hash: T5K273BOHMXCQ7EXOHQ52NBTHL3PPAML X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925447910019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Nothing in the tree references RST2MAN or RST2HTML5 variables, only rst2man_prog & rst2html5_prog, so the former can be removed. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- docs/meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/meson.build b/docs/meson.build index d7343b6665..4f8982ee90 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -176,7 +176,6 @@ docs_programs_groups =3D [ foreach item : docs_programs_groups prog =3D find_program(item.get('prog'), dirs: libvirt_sbin_path) varname =3D item.get('name').underscorify() - conf.set_quoted(varname.to_upper(), prog.full_path()) set_variable('@0@_prog'.format(varname), prog) endforeach =20 --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925463; cv=none; d=zohomail.com; s=zohoarc; b=dCgGstk3xpNI/vBcAUV7FEeuHPuG+BMfQdXOYApTcRgDRpbhWcbultCS1DJfVK5gppRmUClKNzAnuq+ZTOVgLwodi1dD1uMaka/y1MXnaWv9XhXwIN8ANJwRErY4Ng4PYHdpzkNFbToHJ33M5zpno2/8g6lwKOcy/k8hUxdJ9p0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925463; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=ebpoL9b9nPAjtGa2yGaDoeLWfiv6kz3xPvbJJuh9kPY=; b=cmVACjaauJqxnDLm/qrg+LaMTyTGDvERu2Ahz3QdZMLAmJG+izcebe7EeGtLhLOlqtnOfUCgFdSWVagit6QERLnO1qKg8TbfGJzwjjtua1XaZZEgRl2EMqVKne11FuTDEBtuaoHZ+ZXpKdFArBEbEDl4KGhXZcGMyJ2Ka1KYmR4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925463498648.4879869703457; Tue, 29 Apr 2025 04:17:43 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 89683149B; Tue, 29 Apr 2025 07:17:42 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id F3236131A; Tue, 29 Apr 2025 07:14:54 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 00B81140C; Tue, 29 Apr 2025 07:14:49 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 918451322 for ; Tue, 29 Apr 2025 07:14:33 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-hhR98RceNm6X7KkYxE1z0Q-1; Tue, 29 Apr 2025 07:14:31 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CAE511956094 for ; Tue, 29 Apr 2025 11:14:30 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F0833195608D; Tue, 29 Apr 2025 11:14:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUuwSFsnny/NNtrTfFIpXx+fxGOakiSZSZBb6UX98mM=; b=Od/vb+SYDvmev5l0l4AkR9BTawlffoOazivaSBMQMNl7L/B8pse+EvJzu1wjprBjvMjTsc aFhcIl13+DzlE8Kytl1qpQWU6+ld6/GqXu1yaLrEVBNwHJgE5RB2fuiTGiBwFUjzB3WGMS JumWRdw5f7rYgC6aNg5LnV3Mv9YYXz8= X-MC-Unique: hhR98RceNm6X7KkYxE1z0Q-1 X-Mimecast-MFC-AGG-ID: hhR98RceNm6X7KkYxE1z0Q_1745925270 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 07/20] build-aux: add missing definition of PERL variable Date: Tue, 29 Apr 2025 12:14:07 +0100 Message-ID: <20250429111420.1748521-8-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: boCP0OgDX5tml8eUIFBauRyCnWRHV3zp0EM06ai9nMo_1745925270 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TBZABERMLYRYKLKEMVRRQHHWDMY5UBCN X-Message-ID-Hash: TBZABERMLYRYKLKEMVRRQHHWDMY5UBCN X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925465824019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Currently $(PERL) is expanding to nothing, but the spacing-check.pl test luckily still works via the shebang. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- build-aux/Makefile.in | 1 + build-aux/meson.build | 1 + 2 files changed, 2 insertions(+) diff --git a/build-aux/Makefile.in b/build-aux/Makefile.in index db44ee36a4..f30773e263 100644 --- a/build-aux/Makefile.in +++ b/build-aux/Makefile.in @@ -6,6 +6,7 @@ FLAKE8 =3D @flake8_path@ BLACK =3D @black_path@ RUNUTF8 =3D @runutf8@ PYTHON =3D @PYTHON3@ +PERL =3D @PERL@ GREP =3D @GREP@ SED =3D @SED@ AWK =3D @AWK@ diff --git a/build-aux/meson.build b/build-aux/meson.build index 06be6ab6c8..bcd10e89f2 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -42,6 +42,7 @@ if git and tests_enabled[0] 'black_path': black_path, 'runutf8': ' '.join(runutf8), 'PYTHON3': python3_prog.full_path(), + 'PERL': perl_prog.full_path(), 'GREP': grep_prog.full_path(), 'SED': sed_prog.full_path(), 'AWK': awk_prog.full_path(), --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925480; cv=none; d=zohomail.com; s=zohoarc; b=mJSDzMqDGzRlF+P7SydlbAqduM2l1vw8Z6N/RqpYy+yvtMrudVEPSljQVVZkDFwHTDKHcJDkbhmSMVg4ZlnGj4jwmOJudyQB2OwrcWVo3cM6M5orj72KptKerQQ6GzGHfpj6d3nS62U6oizil63FdT3sTVRidmO1Z4QNT9HAEu4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925480; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=8g0/YrcW4H0n+cICqRGnrQuJYtgi7tk1+AkB4sZ0iNw=; b=ZIiPH/vvLf8Sa3szyvkecjJ/vMQVMEkpve2f7E0DcNBymtbwjxxFzOAkVl8oCGEwOwGufupR8OdcUmSTZxU99hl0MMXwZEDCvbT7T3wf5tyDiBbxTnlm+MGQDFTOf7CccJAt7PFcVooD3f0bmF/1T6ZEyX3pM94n54pmbrWdLOk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925480038931.176569545129; Tue, 29 Apr 2025 04:18:00 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 65AB91353; Tue, 29 Apr 2025 07:17:59 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id EEC8613D2; Tue, 29 Apr 2025 07:14:56 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 98E0E140C; Tue, 29 Apr 2025 07:14:50 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B6E1713AE for ; Tue, 29 Apr 2025 07:14:34 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-zDvUtdfCMqC3ihHi1Z8nkg-1; Tue, 29 Apr 2025 07:14:32 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F0CF61956089 for ; Tue, 29 Apr 2025 11:14:31 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2CCA4195608D; Tue, 29 Apr 2025 11:14:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r1Cii6d/V8BHsw7Pw0Yzq39J9KLms/82flUNwfHwYTM=; b=HA3Sz+83iJSEYyKSA1RjYpf4AU/5PFNT2tNcpD9yaWNYvdv/7Sc8+lpY7BjLp0e32YHGn6 SlazunKKZALCxxrtUFyilRPUzhEmit2oMXfIxtJAG0l4eHzpxN2Ygq9DBpVmATfnJpktbO VJulypVKEh9X17mfut3LrLhpi/f5dyk= X-MC-Unique: zDvUtdfCMqC3ihHi1Z8nkg-1 X-Mimecast-MFC-AGG-ID: zDvUtdfCMqC3ihHi1Z8nkg_1745925272 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 08/20] meson: stop setting conf var for required programs Date: Tue, 29 Apr 2025 12:14:08 +0100 Message-ID: <20250429111420.1748521-9-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: pEfGUCY1huuXDx8poTlqaGhBvpFSNJbvjpFzykTUaio_1745925272 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 53VHYRSWDJR5MFUDBIEP5GHUW6F2LKL4 X-Message-ID-Hash: 53VHYRSWDJR5MFUDBIEP5GHUW6F2LKL4 X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925482517019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 There is no reference to PERL, PYTHON3, XMLLINT or XSLTPROC conf variables anywhere, only the ${name}_prog meson variables are used. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index ea3e752f93..e1d183df23 100644 --- a/meson.build +++ b/meson.build @@ -840,7 +840,6 @@ required_programs =3D [ foreach name : required_programs prog =3D find_program(name, dirs: libvirt_sbin_path) varname =3D name.underscorify() - conf.set_quoted(varname.to_upper(), prog.full_path()) set_variable('@0@_prog'.format(varname), prog) endforeach =20 --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925500; cv=none; d=zohomail.com; s=zohoarc; b=ZekLTPnEowyTP4B7zZPZUhVqPIpSujlQYlnqgQJJSuHtEoK6vUX76xymk9qTlduN0oT7r6YkbWtu+u3fUabqvpsETUlXK8HS4jgiVpsk+ZGDJKSQKG1kZmeSMjZ4+d390UXZRcFbopu5Qw46NPAzwxBI9p9dUd1cLsPEPT33QLs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925500; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=lDd3/6hhT9ld5pITn3VJgL04b3j/EvbA3ZbMz0/jS3s=; b=d7GaD3H+V3mRbEpKlYqUmSa8AX8Gms5ZTGEtgzLMK40Z5L4+F1O9uGcMFanrbB0Kj21YEAuAKcXRGnXokMyDKyZfTjHqGyzvxCBYE5/kxNvE6TlVq2kiEi8k8tKRGGAABmRvaPKW/9fyPcaKaBeU3d3aoSsknk+UEDw3+NIpv0U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925500200228.58433769073736; Tue, 29 Apr 2025 04:18:20 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3CC451284; Tue, 29 Apr 2025 07:18:19 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 05AA3143C; Tue, 29 Apr 2025 07:14:59 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 32D8F123F; Tue, 29 Apr 2025 07:14:52 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 9B4371292 for ; Tue, 29 Apr 2025 07:14:35 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-465-Wxa3y-BKP9-o1T-fr9_fKA-1; Tue, 29 Apr 2025 07:14:33 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 19EF3180087B for ; Tue, 29 Apr 2025 11:14:33 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 51FF8195608D; Tue, 29 Apr 2025 11:14:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g7dybMcI9Hp7rckgHesy+6tgsmUq9l4pMgo4OFZ4+YQ=; b=LHaFVrXQbd/vYgDjBquuztJEC05gaG3oZNFZAb/3xMVaDgxuhAlHz8XxuhNq1y93DmZhYH 9XJRbTjZakfnXjefwcMNLwlzociK8G2hbLzrOHnb6uucP4NOnvFngH/ENWfc+8QlY7oK/r lPktt/KL7qngSV0KJ+Kk4Frv8NYaCr4= X-MC-Unique: Wxa3y-BKP9-o1T-fr9_fKA-1 X-Mimecast-MFC-AGG-ID: Wxa3y-BKP9-o1T-fr9_fKA_1745925273 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 09/20] util: remove use hardcoded DMIDECODE path Date: Tue, 29 Apr 2025 12:14:09 +0100 Message-ID: <20250429111420.1748521-10-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: bYM163NgRayOEDDbA-gE2BAT_2FBZSzx8sXffhCmBf0_1745925273 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: PTJJASVI4M7PKFXTVKZ7G5O2QW4NVEJN X-Message-ID-Hash: PTJJASVI4M7PKFXTVKZ7G5O2QW4NVEJN X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925501878019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find 'dmidecode' in $PATH. This command is only usable when running privileged since it relies on reading from a privileged kernel file. Thus we can assume both 'bin' and 'sbin' dirs will be in $PATH and virFindFileInPath will do the right thing to find it when called by virCommand. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 1 - src/util/virsysinfo.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index e1d183df23..06a69308ac 100644 --- a/meson.build +++ b/meson.build @@ -854,7 +854,6 @@ optional_test_programs =3D [ ] =20 optional_programs =3D [ - 'dmidecode', 'ip', 'iscsiadm', 'mdevctl', diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index b7413c3bf5..0f12a8964f 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -894,7 +894,7 @@ virSysinfoDMIDecodeOEMString(unsigned int idx, char **str) { g_autofree char *err =3D NULL; - g_autoptr(virCommand) cmd =3D virCommandNewArgList(DMIDECODE, "--dump", + g_autoptr(virCommand) cmd =3D virCommandNewArgList("dmidecode", "--dum= p", "--oem-string", NULL); virCommandAddArgFormat(cmd, "%u", idx); virCommandSetOutputBuffer(cmd, str); @@ -1199,7 +1199,7 @@ virSysinfoReadDMI(void) g_autofree char *outbuf =3D NULL; g_autoptr(virCommand) cmd =3D NULL; =20 - cmd =3D virCommandNewArgList(DMIDECODE, "-q", "-t", "0,1,2,3,4,11,17",= NULL); + cmd =3D virCommandNewArgList("dmidecode", "-q", "-t", "0,1,2,3,4,11,17= ", NULL); virCommandSetOutputBuffer(cmd, &outbuf); if (virCommandRun(cmd, NULL) < 0) return NULL; --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925560; cv=none; d=zohomail.com; s=zohoarc; b=OtedqLR4AmzoAPM8VLjYxDrBYgnB1nLRp6H+u4WrV6gD7Dj8WR7kxTbI4h1uz/9DVXyI0KF5j3jaXQgyjZdVBzhZJGb+uEprl1j1qj/E970CJoyuMTnsUbF4nRhKxp51cAcJIb5r1hgBEfydH9YHaarmodFxv9PWOeO9E/DqNzM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925560; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=jClYo+6NfPGWgefJYmvUGjagblhAembQT85Mg4o4ezM=; b=fFzbX7uXW7z7UuduOfi4zd2TBEO69JUVkgceJC9wKsBuk2/q2hRK7PMHC46+niM3eCRzmnaR0ZHfGbqx54MoXF8exuvO/zRNLWeyBWJt0bc4cXiF44TLJAcV5Ib/9Zxa5QYKSHrzX5c1znlOlEC0oa4nitlr8SzvuWJdIbvOyLU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925560665281.37499364620385; Tue, 29 Apr 2025 04:19:20 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BCECE1294; Tue, 29 Apr 2025 07:19:19 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 9DFD8142A; Tue, 29 Apr 2025 07:15:02 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 4FB1511C8; Tue, 29 Apr 2025 07:14:56 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id AB41711C8 for ; Tue, 29 Apr 2025 07:14:38 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-RAcmGuw2PcWbmZJTqZrnCg-1; Tue, 29 Apr 2025 07:14:35 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 356ED19560A6 for ; Tue, 29 Apr 2025 11:14:34 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6EEE71956096; Tue, 29 Apr 2025 11:14:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FzYPg4CKAXVgKf9T6X/oHY00pY/bJXG1J8ikEYLI/Fw=; b=D9S1rbLYOP2C3r7ItkiGVpT7rNWuot1qoqSgTz0uQJ0AbKuYnVXjzlytdTPQGpi8f5aCXA CxxoAInczvp4tEDGOtr002P2fAbWRJOIqZAZYjnMY39MRB053cVscxaruT5UJclj469GJn u6qO12zOR/flK2AW3CC/y4kulh9mPr4= X-MC-Unique: RAcmGuw2PcWbmZJTqZrnCg-1 X-Mimecast-MFC-AGG-ID: RAcmGuw2PcWbmZJTqZrnCg_1745925274 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 10/20] meson: remove check for 'ip' program Date: Tue, 29 Apr 2025 12:14:10 +0100 Message-ID: <20250429111420.1748521-11-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rjfOdCZAUespi3m7jdmYlBS8ZqqEuiagefLj6Rdvt6o_1745925274 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: H4YFLE5VPJKTSYY5UCKVMVOJ75IDNBFU X-Message-ID-Hash: H4YFLE5VPJKTSYY5UCKVMVOJ75IDNBFU X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925563993019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 There are no references to an "IP" conf variable nor a meson 'ip_prog' variable so the check serves no purpose. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 1 - src/util/virnetdevip.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 06a69308ac..d355767a53 100644 --- a/meson.build +++ b/meson.build @@ -854,7 +854,6 @@ optional_test_programs =3D [ ] =20 optional_programs =3D [ - 'ip', 'iscsiadm', 'mdevctl', 'mm-ctl', diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index f7a7db620d..d4f023ca5c 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -404,7 +404,7 @@ virNetDevIPAddrAdd(const char *ifname, virCommandAddArgList(cmd, "broadcast", bcaststr, NULL); virCommandAddArg(cmd, "alias"); # else - cmd =3D virCommandNew(IP); + cmd =3D virCommandNew("ip"); virCommandAddArgList(cmd, "addr", "add", NULL); virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); if (peerstr) @@ -441,7 +441,7 @@ virNetDevIPAddrDel(const char *ifname, virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); virCommandAddArg(cmd, "-alias"); # else - cmd =3D virCommandNew(IP); + cmd =3D virCommandNew("ip"); virCommandAddArgList(cmd, "addr", "del", NULL); virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); virCommandAddArgList(cmd, "dev", ifname, NULL); @@ -469,7 +469,7 @@ virNetDevIPRouteAdd(const char *ifname, return -1; if (!(gatewaystr =3D virSocketAddrFormat(gateway))) return -1; - cmd =3D virCommandNew(IP); + cmd =3D virCommandNew("ip"); virCommandAddArgList(cmd, "route", "add", NULL); virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); virCommandAddArgList(cmd, "via", gatewaystr, "dev", ifname, --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925541; cv=none; d=zohomail.com; s=zohoarc; b=jQ+mL01PCx70lo+o0qc3B5CPasJn5toxF/wT4A1mtwmGSjWqgnFE+Iym7QzxaBkRdz+MXFr4zL64kTno68d02ENYWUEcEX9WveMKwzfxib6Pz1IpDUFVdeZ+VJoq4xfkPZZ4VBBrxYVjj+JQSgbHiz7P6UExaXgwSpXKep1ZwKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925541; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=8ajpaKBlpBqd5kVjUJfqt2eOsub8V0up/BH0pTl0lME=; b=Ut/ehLDx6L07lHWHKVRMsMjiYP1oawaER+N7NrChej+AfMePOnL1B06OR/8/wgBwwKkL5Y4rbvHjXJYUyC0qN3ckeUUPCNj9ze7zCNRYnfWrY+pBdgBKIW3q2qWDjiYwJ8CU7e36IaOvx5xReDsSQ6tc3H6HJfkwut/5nerPKLE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925541043362.43736032081847; Tue, 29 Apr 2025 04:19:01 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 2078D13F2; Tue, 29 Apr 2025 07:19:00 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id AFB79144C; Tue, 29 Apr 2025 07:15:00 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 12D1F138D; Tue, 29 Apr 2025 07:14:56 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4CB6B1402 for ; Tue, 29 Apr 2025 07:14:38 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-38-AStapXj1OTWFgl3M2GNg4Q-1; Tue, 29 Apr 2025 07:14:36 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 684E41800984 for ; Tue, 29 Apr 2025 11:14:35 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8B3DA195608D; Tue, 29 Apr 2025 11:14:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FmGAP0BxQDbEj214oO4lkbCKXD/EsK+1LohjdJ7JbCs=; b=LLqrZIJiLnr44v/bTNwXRxYserojODqThrtx7eZ5PdVPcDf9mYIjb4fLN1FAT2CXY5aZ6n vtetEYLkqcUnJWqZ2YX6Xs1gIDoz44KHfeCQjdvOna2B2J09WRA8h7AsCltCucazEqADSL yOyzVL8KBuTx3+qWMTw/37nXXU87YM0= X-MC-Unique: AStapXj1OTWFgl3M2GNg4Q-1 X-Mimecast-MFC-AGG-ID: AStapXj1OTWFgl3M2GNg4Q_1745925275 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 11/20] util: remove hardcoded ISCSIADM command path Date: Tue, 29 Apr 2025 12:14:11 +0100 Message-ID: <20250429111420.1748521-12-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Id-NFwXJssfCYIneUvdZueMMRcAJ6Hp0xE-5_IzLkXk_1745925275 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JO7WCU5T2FEYPM2YGWN5WBJEJ6DJVNS3 X-Message-ID-Hash: JO7WCU5T2FEYPM2YGWN5WBJEJ6DJVNS3 X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925542451019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find 'dmidecode' in $PATH. This command is only usable when running privileged since it relies on reading from a privileged kernel file. Thus we can assume both 'bin' and 'sbin' dirs will be in $PATH and virFindFileInPath will do the right thing to find it when called by virCommand. Gating the iscsi driver backend on a isciadm probe is likely to do more harm than good as it needlessly disables the code if the dev forgot to install iscsiadm at build time. As a Linux only command it is simpler to gate the feature based on the platform choice and allow missing binaries to be diagnose at runtime. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 5 ++-- src/util/viriscsi.c | 55 ++++++++++++++++++++++---------------------- tests/viriscsitest.c | 16 ++++++------- 3 files changed, 37 insertions(+), 39 deletions(-) diff --git a/meson.build b/meson.build index d355767a53..9759a3322b 100644 --- a/meson.build +++ b/meson.build @@ -854,7 +854,6 @@ optional_test_programs =3D [ ] =20 optional_programs =3D [ - 'iscsiadm', 'mdevctl', 'mm-ctl', 'modprobe', @@ -1825,11 +1824,11 @@ if conf.has('WITH_LIBVIRTD') error('Need glusterfs (libgfapi) for gluster storage driver') endif =20 - if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() and host_machine.system() = =3D=3D 'linux' use_storage =3D true conf.set('WITH_STORAGE_ISCSI', 1) elif get_option('storage_iscsi').enabled() - error('We need iscsiadm for iSCSI storage driver') + error('Linux host needed for iSCSI storage driver using iscsiadm') endif =20 if not get_option('storage_iscsi_direct').disabled() and libiscsi_dep.fo= und() diff --git a/src/util/viriscsi.c b/src/util/viriscsi.c index a70c87cbdb..f6b2cdba0c 100644 --- a/src/util/viriscsi.c +++ b/src/util/viriscsi.c @@ -88,8 +88,8 @@ virISCSIGetSession(const char *devpath, int exitstatus =3D 0; g_autofree char *error =3D NULL; =20 - g_autoptr(virCommand) cmd =3D virCommandNewArgList(ISCSIADM, "--mode", - "session", NULL); + g_autoptr(virCommand) cmd =3D virCommandNewArgList("iscsiadm", "--mode= ", + "session", NULL); virCommandSetErrorBuffer(cmd, &error); =20 if (virCommandRunRegex(cmd, @@ -123,8 +123,8 @@ virStorageBackendIQNFound(const char *initiatoriqn, g_autofree char *outbuf =3D NULL; g_autofree char *iface =3D NULL; g_autofree char *iqn =3D NULL; - g_autoptr(virCommand) cmd =3D virCommandNewArgList(ISCSIADM, - "--mode", "iface", = NULL); + g_autoptr(virCommand) cmd =3D virCommandNewArgList("iscsiadm", + "--mode", "iface", NU= LL); =20 *ifacename =3D NULL; =20 @@ -193,8 +193,8 @@ virStorageBackendIQNFound(const char *initiatoriqn, =20 error: virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed output of %1$s: %2$s"), - ISCSIADM, line); + _("malformed output of 'iscsiadm': %1$s"), + line); goto cleanup; } =20 @@ -215,7 +215,7 @@ virStorageBackendCreateIfaceIQN(const char *initiatoriq= n, VIR_DEBUG("Attempting to create interface '%s' with IQN '%s'", temp_ifacename, initiatoriqn); =20 - newcmd =3D virCommandNewArgList(ISCSIADM, + newcmd =3D virCommandNewArgList("iscsiadm", "--mode", "iface", "--interface", temp_ifacename, "--op", "new", @@ -225,13 +225,12 @@ virStorageBackendCreateIfaceIQN(const char *initiator= iqn, * We will just rely on whether the interface got created * properly. */ if (virCommandRun(newcmd, &exitstatus) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to run command '%1$s' to create new iscsi= interface"), - ISCSIADM); + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Failed to run command 'iscsiadm' to create new i= scsi interface")); return -1; } =20 - updatecmd =3D virCommandNewArgList(ISCSIADM, + updatecmd =3D virCommandNewArgList("iscsiadm", "--mode", "iface", "--interface", temp_ifacename, "--op", "update", @@ -244,8 +243,8 @@ virStorageBackendCreateIfaceIQN(const char *initiatoriq= n, * rely on whether iface file got updated properly. */ if (virCommandRun(updatecmd, &exitstatus) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to run command '%1$s' to update iscsi int= erface with IQN '%2$s'"), - ISCSIADM, initiatoriqn); + _("Failed to run command 'iscsiadm' to update iscsi= interface with IQN '%1$s'"), + initiatoriqn); return -1; } =20 @@ -273,7 +272,7 @@ virISCSIConnection(const char *portal, const char **extraargv) { const char *const baseargv[] =3D { - ISCSIADM, + "iscsiadm", "--mode", "node", "--portal", portal, "--targetname", target, @@ -343,11 +342,11 @@ virISCSIConnectionLogout(const char *portal, int virISCSIRescanLUNs(const char *session) { - g_autoptr(virCommand) cmd =3D virCommandNewArgList(ISCSIADM, - "--mode", "session", - "-r", session, - "-R", - NULL); + g_autoptr(virCommand) cmd =3D virCommandNewArgList("iscsiadm", + "--mode", "session", + "-r", session, + "-R", + NULL); return virCommandRun(cmd, NULL); } =20 @@ -396,11 +395,11 @@ virISCSIScanTargetsInternal(const char *portal, int vars[] =3D { 2 }; struct virISCSITargetList list =3D { 0 }; size_t i; - g_autoptr(virCommand) cmd =3D virCommandNewArgList(ISCSIADM, - "--mode", "discover= y", - "--type", "sendtarg= ets", - "--portal", portal, - NULL); + g_autoptr(virCommand) cmd =3D virCommandNewArgList("iscsiadm", + "--mode", "discovery", + "--type", "sendtarget= s", + "--portal", portal, + NULL); =20 if (!persist) { virCommandAddArgList(cmd, @@ -512,7 +511,7 @@ virISCSINodeNew(const char *portal, g_autoptr(virCommand) cmd =3D NULL; int status; =20 - cmd =3D virCommandNewArgList(ISCSIADM, + cmd =3D virCommandNewArgList("iscsiadm", "--mode", "node", "--portal", portal, "--targetname", target, @@ -528,8 +527,8 @@ virISCSINodeNew(const char *portal, =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%1$s failed new mode for target '%2$s' with stat= us '%3$d'"), - ISCSIADM, target, status); + _("'iscsiadm': failed new mode for target '%1$s' wi= th status '%2$d'"), + target, status); return -1; } =20 @@ -546,7 +545,7 @@ virISCSINodeUpdate(const char *portal, g_autoptr(virCommand) cmd =3D NULL; int status; =20 - cmd =3D virCommandNewArgList(ISCSIADM, + cmd =3D virCommandNewArgList("iscsiadm", "--mode", "node", "--portal", portal, "--target", target, diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index f2539e47b0..ee29b6f259 100644 --- a/tests/viriscsitest.c +++ b/tests/viriscsitest.c @@ -82,7 +82,7 @@ static void testIscsiadmCb(const char *const*args, { struct testIscsiadmCbData *data =3D opaque; =20 - if (args[0] && STREQ(args[0], ISCSIADM) && + if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "session") && args[3] =3D=3D NULL) { @@ -90,7 +90,7 @@ static void testIscsiadmCb(const char *const*args, *output =3D g_strdup(iscsiadmSessionOutputNonFlash); else *output =3D g_strdup(iscsiadmSessionOutput); - } else if (args[0] && STREQ(args[0], ISCSIADM) && + } else if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "discovery") && args[3] && STREQ(args[3], "--type") && @@ -101,7 +101,7 @@ static void testIscsiadmCb(const char *const*args, args[8] && STREQ(args[8], "nonpersistent") && args[9] =3D=3D NULL) { *output =3D g_strdup(iscsiadmSendtargetsOutput); - } else if (args[0] && STREQ(args[0], ISCSIADM) && + } else if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "node") && args[3] && STREQ(args[3], "--portal") && @@ -120,7 +120,7 @@ static void testIscsiadmCb(const char *const*args, * target: iqn.2004-06.example:example1:iscsi.test, \ * portal: 10.20.30.40:3260,1] successful. */ - } else if (args[0] && STREQ(args[0], ISCSIADM) && + } else if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "iface") && args[3] =3D=3D NULL) { @@ -128,7 +128,7 @@ static void testIscsiadmCb(const char *const*args, *output =3D g_strdup(iscsiadmIfaceIfaceOutput); else *output =3D g_strdup(iscsiadmIfaceDefaultOutput); - } else if (args[0] && STREQ(args[0], ISCSIADM) && + } else if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "iface") && args[3] && STREQ(args[3], "--interface") && @@ -142,7 +142,7 @@ static void testIscsiadmCb(const char *const*args, * New interface libvirt-iface-03020100 added */ data->iface_created =3D true; - } else if (args[0] && STREQ(args[0], ISCSIADM) && + } else if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "iface") && args[3] && STREQ(args[3], "--interface") && @@ -160,7 +160,7 @@ static void testIscsiadmCb(const char *const*args, * * libvirt-iface-03020100 updated. */ - } else if (args[0] && STREQ(args[0], ISCSIADM) && + } else if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "discovery") && args[3] && STREQ(args[3], "--type") && @@ -172,7 +172,7 @@ static void testIscsiadmCb(const char *const*args, args[9] =3D=3D NULL && data->iface_created) { *output =3D g_strdup(iscsiadmSendtargetsOutput); - } else if (args[0] && STREQ(args[0], ISCSIADM) && + } else if (args[0] && STREQ(args[0], "iscsiadm") && args[1] && STREQ(args[1], "--mode") && args[2] && STREQ(args[2], "node") && args[3] && STREQ(args[3], "--portal") && --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925577; cv=none; d=zohomail.com; s=zohoarc; b=em/da5gKsCG8BKeLeECsIRSWYLnUe6W1zdT7jGqLPtRUn/Bt/yubyAjsds8xN9/J1zEX3ab6dkeKHRadOa4JCYWNdDFaBK8RF1gh7PWo7FDB73KPmRTNNs+XdqZT/G9hTe2TYdWsakLvNktPgYDKT7URWZD6FpSc3hL5HK7vDrQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925577; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=5BX2qRZ0PUOIa1K7kd7i8+Cdwo/Rxf9zGHypXsOYZwk=; b=cuLUosadxGPqMU4C3xVUZRdneKWrwxwCh0nBdgwpZcGN1Ynj1bOCT1AKhuLqFyly8gvfWne/EuWED1ri5VfQubA4uPxi0rWP8YTE87tRNPpfEiD6EasaNLiZjGUD8KJsh/LxRyi1cQ2BWe4HsfjNlVSuMLIzWKQvBrRLx/KOvTU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174592557754294.72565762286013; Tue, 29 Apr 2025 04:19:37 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0329A1294; Tue, 29 Apr 2025 07:19:36 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 939AE140D; Tue, 29 Apr 2025 07:15:08 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5AD2C12E6; Tue, 29 Apr 2025 07:15:04 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 03558140E for ; Tue, 29 Apr 2025 07:14:38 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-157-ad7zj7rTOIurheh7mIk-Zw-1; Tue, 29 Apr 2025 07:14:37 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8466D180010A for ; Tue, 29 Apr 2025 11:14:36 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BF459195608D; Tue, 29 Apr 2025 11:14:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J3+mmETqEHAbEznjPyeh1vcfwwNg7L0mxuFN6RrnEps=; b=KkG4bshp3r0vf2LiafR/hzyUWevPJXcha7SW5t7vSaHjtdCg7/g8FuAQ/oWK1GXuX06EP9 PL0v6gOXdbiiQPFvsjUjnUquPZ0IJyUYZh7qnZcN2sBxKYRc0bXZ24A5Zo8xQE63vDgWFA gsuoUOjPP5ijidfOrtq8B3j0xGBeUHQ= X-MC-Unique: ad7zj7rTOIurheh7mIk-Zw-1 X-Mimecast-MFC-AGG-ID: ad7zj7rTOIurheh7mIk-Zw_1745925276 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 12/20] nodedev: remove use hardcoded MDEVCTL path Date: Tue, 29 Apr 2025 12:14:12 +0100 Message-ID: <20250429111420.1748521-13-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ECzAX7usKqoZupQ4SNXOyDMlHikhudaMQ57dW78euGk_1745925276 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IHWIXLVPIYNRUFCLTACBEQ6T5VPWZLCI X-Message-ID-Hash: IHWIXLVPIYNRUFCLTACBEQ6T5VPWZLCI X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925578724019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find 'mdevctl' in $PATH. This command is only used when running privileged in which case both 'bin' and 'sbin' dirs will be in $PATH, so virFindFileInPath will do the right thing to find it. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/node_device/node_device_driver.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index 123b16a292..2c9e749495 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -744,14 +744,14 @@ nodeDeviceGetMdevctlCommand(virNodeDeviceDef *def, case MDEVCTL_CMD_CREATE: /* now is the time to make sure "create" is replaced with "start" = on * mdevctl cmdline */ - cmd =3D virCommandNewArgList(MDEVCTL, "start", NULL); + cmd =3D virCommandNewArgList("mdevctl", "start", NULL); break; case MDEVCTL_CMD_STOP: case MDEVCTL_CMD_START: case MDEVCTL_CMD_DEFINE: case MDEVCTL_CMD_UNDEFINE: case MDEVCTL_CMD_MODIFY: - cmd =3D virCommandNewArgList(MDEVCTL, subcommand, NULL); + cmd =3D virCommandNewArgList("mdevctl", subcommand, NULL); break; case MDEVCTL_CMD_LAST: default: @@ -901,7 +901,7 @@ nodeDeviceGetMdevctlModifySupportCheck(void) g_autoptr(virCommand) cmd =3D NULL; const char *subcommand =3D virMdevctlCommandTypeToString(MDEVCTL_CMD_M= ODIFY); =20 - cmd =3D virCommandNewArgList(MDEVCTL, + cmd =3D virCommandNewArgList("mdevctl", subcommand, "--defined", "--live", @@ -1130,7 +1130,7 @@ nodeDeviceGetMdevctlSetAutostartCommand(virNodeDevice= Def *def, bool autostart, char **errmsg) { - virCommand *cmd =3D virCommandNewArgList(MDEVCTL, + virCommand *cmd =3D virCommandNewArgList("mdevctl", "modify", "--uuid", def->caps->data.mdev.uuid, @@ -1176,7 +1176,7 @@ nodeDeviceGetMdevctlListCommand(bool defined, char **output, char **errmsg) { - virCommand *cmd =3D virCommandNewArgList(MDEVCTL, + virCommand *cmd =3D virCommandNewArgList("mdevctl", "list", "--dumpjson", NULL); @@ -1894,8 +1894,8 @@ nodeDeviceUpdateMediatedDevices(virNodeDeviceDriverSt= ate *node_driver) virMdevctlForEachData data =3D { 0, }; size_t i; =20 - if (!(mdevctl =3D virFindFileInPath(MDEVCTL))) { - VIR_DEBUG(MDEVCTL " not found. Skipping update of mediated devices= ."); + if (!(mdevctl =3D virFindFileInPath("mdevctl"))) { + VIR_DEBUG("'mdevctl' not found. Skipping update of mediated device= s."); return 0; } =20 --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925593; cv=none; d=zohomail.com; s=zohoarc; b=SdCYwNV8oNXrjB9qqKd2yhnH52iYGMPjG8zFwe8boW/WC2USWnvkfkiROkRb9HHIbWYu9LhAuGvxDO/yuhocysO6L3c24NlsLXlDJIWiIeyffYO3XA+ZQqHFL6dptHiQj9IkGiZXsdN2mrPmW5A3/qaCO4VVPJzqOXymPrDYvBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925593; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=tjg2wtBsLwoGKaKHqMStkMhIVFvVKNeseR0XW+07HYE=; b=Qv9XjEbIoAgmnk1bwZxD8WpEtMqkXTts6KDfIVBy+ANh8HVayE27fDHxAfTXqXlI6EgA4ojwy66dJWAD21jBRt42oprwhacxkzNmEtkV7qurQnl0TpdPAEBYxc4qNt5sm5TLmHa8AD/e0CwGrO/IAYWSiR+F+wqf22Q7x9awSHg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925593893159.29446755094898; Tue, 29 Apr 2025 04:19:53 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 55C9614AC; Tue, 29 Apr 2025 07:19:53 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B832513DB; Tue, 29 Apr 2025 07:15:11 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 735EE12E6; Tue, 29 Apr 2025 07:15:04 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3F3BA1415 for ; Tue, 29 Apr 2025 07:14:40 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-152-8YkRnWmKMiuRzz-4BJFQlQ-1; Tue, 29 Apr 2025 07:14:38 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9EEA91956087 for ; Tue, 29 Apr 2025 11:14:37 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D9AAA195608D; Tue, 29 Apr 2025 11:14:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ocQhEdHV0P2qyUHQGizH+gIK985CVGQuSVG9hwUyU74=; b=IRliYZ/rTJmJnscmiARo6Wi/XJABU+gXplKdJd9gHwxYtpHGLDKaEqvxpORs7zpMgQ4OcG fHI+Crtj+6A26IYlcToJWjej9OHVMsRmlqn07YXfTCa2ruUQRufMexEv5B/4FRR65fv38A w1HAoJC6CcodUbkRBSIjFvT0Zxk7OXE= X-MC-Unique: 8YkRnWmKMiuRzz-4BJFQlQ-1 X-Mimecast-MFC-AGG-ID: 8YkRnWmKMiuRzz-4BJFQlQ_1745925277 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 13/20] util: remove use hardcoded MM_CTL path Date: Tue, 29 Apr 2025 12:14:13 +0100 Message-ID: <20250429111420.1748521-14-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ur5iA3LDctqunKTj9bNRyeScnRZxVoLbNNcBz37F-B8_1745925277 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HORSMQX4QKUL3V5C6ASLHQV6DOG6WBYV X-Message-ID-Hash: HORSMQX4QKUL3V5C6ASLHQV6DOG6WBYV X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925594825019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find 'mm-ctl' in $PATH. This command is only used when running privileged in which case both 'bin' and 'sbin' dirs will be in $PATH, so virFindFileInPath will do the right thing to find it. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 2 -- src/util/virnetdevmidonet.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 9759a3322b..2a7c264114 100644 --- a/meson.build +++ b/meson.build @@ -854,8 +854,6 @@ optional_test_programs =3D [ ] =20 optional_programs =3D [ - 'mdevctl', - 'mm-ctl', 'modprobe', 'ovs-vsctl', 'rmmod', diff --git a/src/util/virnetdevmidonet.c b/src/util/virnetdevmidonet.c index 7a285d2bab..a6f1dd1a8f 100644 --- a/src/util/virnetdevmidonet.c +++ b/src/util/virnetdevmidonet.c @@ -43,7 +43,7 @@ virNetDevMidonetBindPort(const char *ifname, =20 virUUIDFormat(virtualport->interfaceID, virtportuuid); =20 - cmd =3D virCommandNew(MM_CTL); + cmd =3D virCommandNew("mm-ctl"); =20 virCommandAddArgList(cmd, "--bind-port", virtportuuid, ifname, NULL); =20 @@ -73,7 +73,7 @@ virNetDevMidonetUnbindPort(const virNetDevVPortProfile *v= irtualport) =20 virUUIDFormat(virtualport->interfaceID, virtportuuid); =20 - cmd =3D virCommandNew(MM_CTL); + cmd =3D virCommandNew("mm-ctl"); virCommandAddArgList(cmd, "--unbind-port", virtportuuid, NULL); =20 if (virCommandRun(cmd, NULL) < 0) { --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925620; cv=none; d=zohomail.com; s=zohoarc; b=iWlfW0qvUFFp+urnKlEJS+lvg0gwfVn9z7Sx6b9hD52LdQjsrjJUNg0V/iNfZRBxjjYbKwJZwDr9qkJA5S6E2BXrUSou6FVFYPmDemwOOpQ1l04cKDzv4iorLeZ2pPCONaaDlV8kENPiMvFVZeryODVfPunVkwTvESDAk45b1Bs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925620; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=l995zugbisfMuI1jk0GXCORubCZEFbKRSi7kL0vl8h4=; b=AMDJAlCSONzMLMFQb3jmsx9sYlPg1ZoVpOaF04Iu8z0fJFcfdmjRA58iYmovHWSqLHRfVjJPhYg0+atonjNIBGS+ZCzC7VKoVNP4HVROXzJWB1mWe5L4TITcknNlAwI3PH25aVMMeIUgSb8a6ww2jVNPPr7lO5DWGTjkImXXzbE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925620423732.5238687547339; Tue, 29 Apr 2025 04:20:20 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BFE2A11F1; Tue, 29 Apr 2025 07:20:19 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D448D1465; Tue, 29 Apr 2025 07:15:12 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 31AA6136E; Tue, 29 Apr 2025 07:15:05 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 99E6911F1 for ; Tue, 29 Apr 2025 07:14:41 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-186-a8Z7FW64NMeq6ua3-vrgdQ-1; Tue, 29 Apr 2025 07:14:39 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E18E7195608C for ; Tue, 29 Apr 2025 11:14:38 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 14D00195608D; Tue, 29 Apr 2025 11:14:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B3eUfYjb1XL2K7sIIuUii5BotCAmzTjHePeXQYfMbgI=; b=AOm8E+9AYTlETrExAMVfI2zzcTk96FAydn2rJOWTYdEBJGPkyQES0oBHV+mN/2Da1AEsaV 1SYbBJoMI1sstXZ+x8W4re7eiVRL6cwvCya+9S74JnxTOH3T8hF1J/Hn/e71VsFlN9rtvF 5vYAHWswO+1ZbP1nvw/oN3XawY6WVyE= X-MC-Unique: a8Z7FW64NMeq6ua3-vrgdQ-1 X-Mimecast-MFC-AGG-ID: a8Z7FW64NMeq6ua3-vrgdQ_1745925279 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 14/20] util: remove use hardcoded MODPROBE/RMMOD paths Date: Tue, 29 Apr 2025 12:14:14 +0100 Message-ID: <20250429111420.1748521-15-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hqZZ95eALyN9LhZSRUgwtGaGPD-RU3ZeZIJB_4_Vry4_1745925279 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: KVEXNI3DPR7LGWADUCEPQO4ORGJIBV6J X-Message-ID-Hash: KVEXNI3DPR7LGWADUCEPQO4ORGJIBV6J X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925620932019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find 'modprobe' & 'rmmod' in $PATH. These commands are only used when running privileged in which case both 'bin' and 'sbin' dirs will be in $PATH, so virFindFileInPath will do the right thing to find them. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 2 -- src/util/virkmod.c | 4 ++-- tests/virkmodtest.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 2a7c264114..3022f0b984 100644 --- a/meson.build +++ b/meson.build @@ -854,9 +854,7 @@ optional_test_programs =3D [ ] =20 optional_programs =3D [ - 'modprobe', 'ovs-vsctl', - 'rmmod', 'tc', ] + optional_test_programs =20 diff --git a/src/util/virkmod.c b/src/util/virkmod.c index 4c709f8659..111627f4b1 100644 --- a/src/util/virkmod.c +++ b/src/util/virkmod.c @@ -29,7 +29,7 @@ doModprobe(const char *opts, const char *module, char **o= utbuf, char **errbuf) { g_autoptr(virCommand) cmd =3D NULL; =20 - cmd =3D virCommandNewArgList(MODPROBE, opts, NULL); + cmd =3D virCommandNewArgList("modprobe", opts, NULL); if (module) virCommandAddArg(cmd, module); if (outbuf) @@ -48,7 +48,7 @@ doRmmod(const char *module, char **errbuf) { g_autoptr(virCommand) cmd =3D NULL; =20 - cmd =3D virCommandNewArgList(RMMOD, module, NULL); + cmd =3D virCommandNewArgList("rmmod", module, NULL); virCommandSetErrorBuffer(cmd, errbuf); =20 if (virCommandRun(cmd, NULL) < 0) diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c index ec28ef1282..eb9a2aa740 100644 --- a/tests/virkmodtest.c +++ b/tests/virkmodtest.c @@ -63,7 +63,7 @@ testKModLoad(const void *args G_GNUC_UNUSED) return -1; } =20 - if (checkOutput(&buf, MODPROBE " -b " MODNAME "\n") < 0) + if (checkOutput(&buf, "modprobe -b " MODNAME "\n") < 0) return -1; =20 return 0; @@ -85,7 +85,7 @@ testKModUnload(const void *args G_GNUC_UNUSED) return -1; } =20 - if (checkOutput(&buf, RMMOD " " MODNAME "\n") < 0) + if (checkOutput(&buf, "rmmod " MODNAME "\n") < 0) return -1; =20 return 0; --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925661; cv=none; d=zohomail.com; s=zohoarc; b=aqddd1Atspj8P3oPzy0rJmReMFgXCE/71gw0pQtNSvf6bbtXsgGRxzi12Ck+doxxLLluHx1tqYn36vVRY7+Okt+V9UkTAOfp985s/7II3RsAgepwXjqNe1GwAki/nY93Ik8raw0aiJj9ZtpDbFf2SMgHtb3V73UCDK6WLi6t5hs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925661; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=D0YMPd823ui7izAna/BUfQR5yMq+NVNi8SsDV3OnKCw=; b=MESS6n0Vx/uCcaoIdLDQllzA3jZcO2c4zBVG6SIQ7Twva9yL5YVGnHwDDTkFX6/KkTdj3ovkKVdi0AiBDwxru86ogaVI9LtOEJmQxYby8+od6v0TF4iqzlLqcmQGhPGkSr/PHjFLZeZEJMzlY5UJu7kEzbsOz0L3bttp+6VQ1/g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925661348905.6652070315756; Tue, 29 Apr 2025 04:21:01 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 61CA013F8; Tue, 29 Apr 2025 07:21:00 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A2CED1453; Tue, 29 Apr 2025 07:15:16 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0DFED145A; Tue, 29 Apr 2025 07:15:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D37AB141C for ; Tue, 29 Apr 2025 07:14:42 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-GnF4S7w1NcunGV-9XfN9EA-1; Tue, 29 Apr 2025 07:14:41 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5E13C1955DC5 for ; Tue, 29 Apr 2025 11:14:40 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 43219195608D; Tue, 29 Apr 2025 11:14:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0ZG7bzrKG7kwcnpPGi5+wn3C4OoxB5LR5z2lhUSAkCU=; b=CLhpqCy8C9QgzOTDwBaJLvw5dPRrmlJc597CKs0Pr+YQ+0zluxbn4QhTRCOyS4BqqqvDhh tnExkLL+zf8FfSFb05bkg9d4EMvAwce/p+cO46V8Ai+Z21GT/aN1Dbtybg4NaOwcYeswX7 djhzMg+mr88KQAUUgteLptkd5ayqrYQ= X-MC-Unique: GnF4S7w1NcunGV-9XfN9EA-1 X-Mimecast-MFC-AGG-ID: GnF4S7w1NcunGV-9XfN9EA_1745925280 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 15/20] util: remove use hardcoded OVS_VSCTL path Date: Tue, 29 Apr 2025 12:14:15 +0100 Message-ID: <20250429111420.1748521-16-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: pnM38IbxBEpo9WXBLJ2Zg5_VA6ph_VtAPppeMm5lR4A_1745925280 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: R7SONYYFAY5TQPEN6VQH4CBTO4G7OOWJ X-Message-ID-Hash: R7SONYYFAY5TQPEN6VQH4CBTO4G7OOWJ X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925664649019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find 'ovs-vsctl' in $PATH. This command is only used when running privileged in which case both 'bin' and 'sbin' dirs will be in $PATH, so virFindFileInPath will do the right thing to find it. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 1 - src/util/virnetdevopenvswitch.c | 4 +- tests/virnetdevbandwidthtest.c | 52 +++++++++++----------- tests/virnetdevopenvswitchtest.c | 74 ++++++++++++++++---------------- 4 files changed, 65 insertions(+), 66 deletions(-) diff --git a/meson.build b/meson.build index 3022f0b984..0515820cdd 100644 --- a/meson.build +++ b/meson.build @@ -854,7 +854,6 @@ optional_test_programs =3D [ ] =20 optional_programs =3D [ - 'ovs-vsctl', 'tc', ] + optional_test_programs =20 diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index 0f5d23b794..868d6d26ba 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -56,7 +56,7 @@ virNetDevOpenvswitchSetTimeout(unsigned int timeout) static virCommand * virNetDevOpenvswitchCreateCmd(char **errbuf) { - virCommand *cmd =3D virCommandNew(OVS_VSCTL); + virCommand *cmd =3D virCommandNew("ovs-vsctl"); =20 virCommandAddArgFormat(cmd, "--timeout=3D%u", virNetDevOpenvswitchTime= out); if (errbuf) @@ -552,7 +552,7 @@ virNetDevOpenvswitchGetVhostuserIfname(const char *path, g_autofree char *absoluteOvsVsctlPath =3D NULL; int status; =20 - if (!(absoluteOvsVsctlPath =3D virFindFileInPath(OVS_VSCTL))) { + if (!(absoluteOvsVsctlPath =3D virFindFileInPath("ovs-vsctl"))) { /* If there is no 'ovs-vsctl' then the interface is * probably not an OpenVSwitch interface and the @path to * socket was created by some DPDK testing script (e.g. diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 31aa7f469d..b7cf546d9f 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -152,13 +152,13 @@ mymain(void) TC " class add dev eth0 parent 1: classid 1:1 htb rate 102= 4kbps quantum 87\n" TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 1= 0\n" TC " filter add dev eth0 parent 1:0 protocol all prio 1 ha= ndle 1 fw flowid 1\n", - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"et= h0\"'\n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0= \"'\n" - OVS_VSCTL " --timeout=3D5 set port eth0 qos=3D@qos1 'exter= nal-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" - " --id=3D@qos1 create qos type=3Dlinux-htb other= _config:min-rate=3D8192000 queues:0=3D@queue0 'external-ids:vm-id=3D\"" VMU= UID "\"'" - " 'external-ids:ifname=3D\"eth0\"' --" - " --id=3D@queue0 create queue other_config:min-r= ate=3D8192000 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D= \"eth0\"'\n" - OVS_VSCTL " --timeout=3D5 set Interface eth0 ingress_polic= ing_rate=3D0 ingress_policing_burst=3D0\n"); + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\= "'\n" + "ovs-vsctl --timeout=3D5 set port eth0 qos=3D@qos1 'extern= al-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" + " --id=3D@qos1 create qos type=3Dlinux-htb other_= config:min-rate=3D8192000 queues:0=3D@queue0 'external-ids:vm-id=3D\"" VMUU= ID "\"'" + " 'external-ids:ifname=3D\"eth0\"' --" + " --id=3D@queue0 create queue other_config:min-ra= te=3D8192000 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\= "eth0\"'\n" + "ovs-vsctl --timeout=3D5 set Interface eth0 ingress_polici= ng_rate=3D0 ingress_policing_burst=3D0\n"); =20 DO_TEST_SET("" " " @@ -168,9 +168,9 @@ mymain(void) TC " qdisc add dev eth0 ingress\n" TC " filter add dev eth0 parent ffff: protocol all u32 mat= ch u32 0 0" " police rate 1024kbps burst 1024kb mtu 64kb drop flowi= d :1\n", - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"et= h0\"'\n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0= \"'\n" - OVS_VSCTL " --timeout=3D5 set Interface eth0 ingress_polic= ing_rate=3D8192\n"); + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\= "'\n" + "ovs-vsctl --timeout=3D5 set Interface eth0 ingress_polici= ng_rate=3D8192\n"); =20 DO_TEST_SET("" " " @@ -186,14 +186,14 @@ mymain(void) TC " qdisc add dev eth0 ingress\n" TC " filter add dev eth0 parent ffff: protocol all u32 mat= ch u32 0 0" " police rate 5kbps burst 7kb mtu 64kb drop flowid :1\n= ", - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"et= h0\"'\n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0= \"'\n" - OVS_VSCTL " --timeout=3D5 set port eth0 qos=3D@qos1 'exter= nal-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" - " --id=3D@qos1 create qos type=3Dlinux-htb other= _config:min-rate=3D8000 other_config:burst=3D32768 other_config:max-rate=3D= 16000" - " queues:0=3D@queue0 'external-ids:vm-id=3D\""= VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" - " --id=3D@queue0 create queue other_config:min-r= ate=3D8000 other_config:burst=3D32768 other_config:max-rate=3D16000" - " 'external-ids:vm-id=3D\"" VMUUID "\"' 'exter= nal-ids:ifname=3D\"eth0\"'\n" - OVS_VSCTL " --timeout=3D5 set Interface eth0 ingress_polic= ing_rate=3D40 ingress_policing_burst=3D56\n"); + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\= "'\n" + "ovs-vsctl --timeout=3D5 set port eth0 qos=3D@qos1 'extern= al-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" + " --id=3D@qos1 create qos type=3Dlinux-htb other_= config:min-rate=3D8000 other_config:burst=3D32768 other_config:max-rate=3D1= 6000" + " queues:0=3D@queue0 'external-ids:vm-id=3D\"" = VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" + " --id=3D@queue0 create queue other_config:min-ra= te=3D8000 other_config:burst=3D32768 other_config:max-rate=3D16000" + " 'external-ids:vm-id=3D\"" VMUUID "\"' 'extern= al-ids:ifname=3D\"eth0\"'\n" + "ovs-vsctl --timeout=3D5 set Interface eth0 ingress_polici= ng_rate=3D40 ingress_policing_burst=3D56\n"); =20 DO_TEST_SET("" " " @@ -210,14 +210,14 @@ mymain(void) TC " filter add dev eth0 parent ffff: protocol all u32 mat= ch" " u32 0 0 police rate 4294967295kbps burst 4194303kb mt= u 64kb" " drop flowid :1\n", - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"et= h0\"'\n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid f= ind qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0= \"'\n" - OVS_VSCTL " --timeout=3D5 set port eth0 qos=3D@qos1 'exter= nal-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" - " --id=3D@qos1 create qos type=3Dlinux-htb other= _config:min-rate=3D34359738360000" - " queues:0=3D@queue0 'external-ids:vm-id=3D\""= VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" - " --id=3D@queue0 create queue other_config:min-r= ate=3D34359738360000 'external-ids:vm-id=3D\"" VMUUID "\"'" - " 'external-ids:ifname=3D\"eth0\"'\n" - OVS_VSCTL " --timeout=3D5 set Interface eth0 ingress_polic= ing_rate=3D34359738360\n"); + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\= "'\n" + "ovs-vsctl --timeout=3D5 set port eth0 qos=3D@qos1 'extern= al-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" + " --id=3D@qos1 create qos type=3Dlinux-htb other_= config:min-rate=3D34359738360000" + " queues:0=3D@queue0 'external-ids:vm-id=3D\"" = VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" + " --id=3D@queue0 create queue other_config:min-ra= te=3D34359738360000 'external-ids:vm-id=3D\"" VMUUID "\"'" + " 'external-ids:ifname=3D\"eth0\"'\n" + "ovs-vsctl --timeout=3D5 set Interface eth0 ingress_polici= ng_rate=3D34359738360\n"); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/virnetdevopenvswitchtest.c b/tests/virnetdevopenvswitcht= est.c index 6e93f5e65a..ffd75ad044 100644 --- a/tests/virnetdevopenvswitchtest.c +++ b/tests/virnetdevopenvswitchtest.c @@ -259,22 +259,22 @@ mymain(void) DO_TEST_SET(("" " " ""), - (OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid = find queue" - " 'external-ids:vm-id=3D\"66616b65-7575-6964-00= 00-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'\n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid = find qos" - " 'external-ids:vm-id=3D\"66616b65-7575-6964-00= 00-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'\n" - OVS_VSCTL " --timeout=3D5 set port tap-fake qos=3D@qos1" - " 'external-ids:vm-id=3D\"66616b65-7575-6964-00= 00-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'" - " -- --id=3D@qos1 create qos type=3Dlinux-htb o= ther_config:min-rate=3D160000000" - " queues:0=3D@queue0 'external-ids:vm-id=3D\"66= 616b65-7575-6964-0000-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'" - " -- --id=3D@queue0 create queue other_config:m= in-rate=3D160000000 " - "'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'\n" - OVS_VSCTL " --timeout=3D5 set Interface tap-fake ingress_= policing_rate=3D0 ingress_policing_burst=3D0\n")); + ("ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid f= ind queue" + " 'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid f= ind qos" + " 'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'\n" + "ovs-vsctl --timeout=3D5 set port tap-fake qos=3D@qos1" + " 'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'" + " -- --id=3D@qos1 create qos type=3Dlinux-htb ot= her_config:min-rate=3D160000000" + " queues:0=3D@queue0 'external-ids:vm-id=3D\"666= 16b65-7575-6964-0000-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'" + " -- --id=3D@queue0 create queue other_config:mi= n-rate=3D160000000 " + "'external-ids:vm-id=3D\"66616b65-7575-6964-0000= -000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'\n" + "ovs-vsctl --timeout=3D5 set Interface tap-fake ingress_p= olicing_rate=3D0 ingress_policing_burst=3D0\n")); =20 DO_TEST_SET(NULL, NULL); =20 @@ -283,25 +283,25 @@ mymain(void) DO_TEST_SET(("" " " ""), - (OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid = find queue" - " 'external-ids:vm-id=3D\"66616b65-7575-6964-00= 00-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'\n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid = find qos" - " 'external-ids:vm-id=3D\"66616b65-7575-6964-00= 00-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'\n" - OVS_VSCTL " --timeout=3D5 set Interface tap-fake ingress_= policing_rate=3D0 ingress_policing_burst=3D0\n")); + ("ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid f= ind queue" + " 'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid f= ind qos" + " 'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'\n" + "ovs-vsctl --timeout=3D5 set Interface tap-fake ingress_p= olicing_rate=3D0 ingress_policing_burst=3D0\n")); =20 DO_TEST_SET(("" " " " " ""), - (OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid = find queue" - " 'external-ids:vm-id=3D\"66616b65-7575-6964-00= 00-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'\n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D_uuid = find qos" - " 'external-ids:vm-id=3D\"66616b65-7575-6964-00= 00-000000000000\"'" - " 'external-ids:ifname=3D\"tap-fake\"'\n" - OVS_VSCTL " --timeout=3D5 set Interface tap-fake ingress_= policing_rate=3D40000\n")); + ("ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid f= ind queue" + " 'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid f= ind qos" + " 'external-ids:vm-id=3D\"66616b65-7575-6964-000= 0-000000000000\"'" + " 'external-ids:ifname=3D\"tap-fake\"'\n" + "ovs-vsctl --timeout=3D5 set Interface tap-fake ingress_p= olicing_rate=3D40000\n")); =20 #define DO_TEST_CLEAR_QOS(Iface, Vmid, Exp_cmd, ...) \ do { \ @@ -316,13 +316,13 @@ mymain(void) } while (0) =20 DO_TEST_CLEAR_QOS(("fake-iface"), vm_id, - (OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D= _uuid find queue" - " 'external-ids:vm-id=3D\"66616b65-7575-6= 964-0000-000000000000\"'" - " 'external-ids:ifname=3D\"fake-iface\"'\= n" - OVS_VSCTL " --timeout=3D5 --no-heading --columns=3D= _uuid find qos" - " 'external-ids:vm-id=3D\"66616b65-7575-6= 964-0000-000000000000\"'" - " 'external-ids:ifname=3D\"fake-iface\"'\= n" - OVS_VSCTL " --timeout=3D5 set Interface fake-iface = ingress_policing_rate=3D0 ingress_policing_burst=3D0\n")); + ("ovs-vsctl --timeout=3D5 --no-heading --columns=3D_= uuid find queue" + " 'external-ids:vm-id=3D\"66616b65-7575-69= 64-0000-000000000000\"'" + " 'external-ids:ifname=3D\"fake-iface\"'\n" + "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_= uuid find qos" + " 'external-ids:vm-id=3D\"66616b65-7575-69= 64-0000-000000000000\"'" + " 'external-ids:ifname=3D\"fake-iface\"'\n" + "ovs-vsctl --timeout=3D5 set Interface fake-iface i= ngress_policing_rate=3D0 ingress_policing_burst=3D0\n")); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925728; cv=none; d=zohomail.com; s=zohoarc; b=hiMYzJC8TMLoJ9gDsbuKHxoDhgmOkmWQSStKNVvrBg/BNc/ITp/Zdie2wJiL8zwJvtZnVjcUoQ103NqJ8CVdBMCmlFZHe3B77Yyd2i4zu2mRLN3NvDJlmNpaEj3mvh0ZcUPEy73gDsdfWi14k76YkVjSVLXZcw3Fe/xh/c8vR9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925728; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=KrLMgBQoEwsPmwNAQjAQ6uN4fRQpCf9vBkyE15jjFAA=; b=bgT9h6JIvWVI27Dc6eR9x0KsnW2yrEYL4TeEdx048c7DsNPlcWBTVFzlfjnQZHGWZHJNpjgaK3exjwpYNfxqXtSfqWiB1dsw5SU2WW9lnA0G1RGmrcII3vBsf7HIV0wPORTBTjTQd6am0IaBnhsed34MVi3XHtPtHGe3zro5CZE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925728770905.6985900301094; Tue, 29 Apr 2025 04:22:08 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id AC4781472; Tue, 29 Apr 2025 07:22:07 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id CAE28142C; Tue, 29 Apr 2025 07:15:19 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 467E91292; Tue, 29 Apr 2025 07:15:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D49CE1392 for ; Tue, 29 Apr 2025 07:14:43 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-tkvESe_3PlibyTxf54TbyA-1; Tue, 29 Apr 2025 07:14:42 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 57A5D18001E0 for ; Tue, 29 Apr 2025 11:14:41 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8D301195608D; Tue, 29 Apr 2025 11:14:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fL/X74deuBN82dT02+H/10MhsyyR5ruknQsO1J9Ixls=; b=WQwOPLupkFYiG2OunI5owIPnGtnFXHPg2fSmlPT0iqSGfxUThVEEnsb4ypwJ6C+hMTaQxd koB3jpouA+hgQJP+kUYwUQV6SyQZer/fbwO+scv1unXAmXtFIYpbB3+ItIorOmjpqEiK6t Zed3MZCY0wfwLDXTEkLE5S5MDo4JswM= X-MC-Unique: tkvESe_3PlibyTxf54TbyA-1 X-Mimecast-MFC-AGG-ID: tkvESe_3PlibyTxf54TbyA_1745925281 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 16/20] util: remove use hardcoded TC path Date: Tue, 29 Apr 2025 12:14:16 +0100 Message-ID: <20250429111420.1748521-17-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Hp6g9uwOsRpWrg0xQ2809V-J9A7jY3TIyzHTOT6-5yw_1745925281 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ISVRX2DGOXBRJKXLPZYR6WI7RD2HNH4P X-Message-ID-Hash: ISVRX2DGOXBRJKXLPZYR6WI7RD2HNH4P X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925730671019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find 'tc' in $PATH. This command is only used when running privileged in which case both 'bin' and 'sbin' dirs will be in $PATH, so virFindFileInPath will do the right thing to find it. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 10 ++---- src/util/virfirewall.h | 1 + src/util/virnetdevbandwidth.c | 36 ++++++++++----------- tests/virnetdevbandwidthtest.c | 58 +++++++++++++++++----------------- 4 files changed, 50 insertions(+), 55 deletions(-) diff --git a/meson.build b/meson.build index 0515820cdd..4223f5ab86 100644 --- a/meson.build +++ b/meson.build @@ -845,7 +845,7 @@ endforeach =20 # optional programs =20 -optional_test_programs =3D [ +optional_programs =3D [ 'augparse', 'black', 'flake8', @@ -853,10 +853,6 @@ optional_test_programs =3D [ 'pytest', ] =20 -optional_programs =3D [ - 'tc', -] + optional_test_programs - missing_optional_programs =3D [] foreach name : optional_programs prog =3D find_program(name, required: false, dirs: libvirt_sbin_path) @@ -865,9 +861,7 @@ foreach name : optional_programs prog_path =3D prog.full_path() else prog_path =3D name - if name in optional_test_programs - missing_optional_programs +=3D [ name ] - endif + missing_optional_programs +=3D [ name ] endif =20 conf.set_quoted(varname.to_upper(), prog_path) diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h index d42e60884b..07391bea67 100644 --- a/src/util/virfirewall.h +++ b/src/util/virfirewall.h @@ -30,6 +30,7 @@ #define IPTABLES "iptables" #define IP6TABLES "ip6tables" #define NFT "nft" +#define TC "tc" =20 typedef struct _virFirewall virFirewall; =20 diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c index 5c6a65528c..b141a38b10 100644 --- a/src/util/virnetdevbandwidth.c +++ b/src/util/virnetdevbandwidth.c @@ -126,7 +126,7 @@ virNetDevBandwidthManipulateFilter(const char *ifname, filter_id =3D g_strdup_printf("800::%u", 800 + id); =20 if (remove_old) { - g_autoptr(virCommand) cmd =3D virCommandNew(TC); + g_autoptr(virCommand) cmd =3D virCommandNew("tc"); int cmd_ret =3D 0; =20 virCommandAddArgList(cmd, "filter", "del", "dev", ifname, @@ -138,7 +138,7 @@ virNetDevBandwidthManipulateFilter(const char *ifname, } =20 if (create_new) { - g_autoptr(virCommand) cmd =3D virCommandNew(TC); + g_autoptr(virCommand) cmd =3D virCommandNew("tc"); virMacAddrGetRaw(ifmac_ptr, ifmac); =20 mac[0] =3D g_strdup_printf("0x%02x%02x%02x%02x", ifmac[2], @@ -334,7 +334,7 @@ virNetDevBandwidthSet(const char *ifname, */ if (hierarchical_class) { virCommandFree(cmd); - cmd =3D virCommandNew(TC); + cmd =3D virCommandNew("tc"); virCommandAddArgList(cmd, "class", "add", "dev", ifname, "pare= nt", "1:", "classid", "1:1", "htb", "rate", av= erage, "ceil", peak ? peak : average, NULL); @@ -343,7 +343,7 @@ virNetDevBandwidthSet(const char *ifname, goto cleanup; } virCommandFree(cmd); - cmd =3D virCommandNew(TC); + cmd =3D virCommandNew("tc"); virCommandAddArgList(cmd, "class", "add", "dev", ifname, "parent", hierarchical_class ? "1:1" : "1:", "classid", hierarchical_class ? "1:2" : "1:1", "htb", @@ -359,7 +359,7 @@ virNetDevBandwidthSet(const char *ifname, goto cleanup; =20 virCommandFree(cmd); - cmd =3D virCommandNew(TC); + cmd =3D virCommandNew("tc"); virCommandAddArgList(cmd, "qdisc", "add", "dev", ifname, "parent", hierarchical_class ? "1:2" : "1:1", "handle", "2:", "sfq", "perturb", @@ -369,7 +369,7 @@ virNetDevBandwidthSet(const char *ifname, goto cleanup; =20 virCommandFree(cmd); - cmd =3D virCommandNew(TC); + cmd =3D virCommandNew("tc"); virCommandAddArgList(cmd, "filter", "add", "dev", ifname, "parent", "1:0", "protocol", "all", "prio", "1", "handl= e", "1", "fw", "flowid", "1", NULL); @@ -397,7 +397,7 @@ virNetDevBandwidthSet(const char *ifname, } =20 virCommandFree(cmd); - cmd =3D virCommandNew(TC); + cmd =3D virCommandNew("tc"); virCommandAddArgList(cmd, "qdisc", "add", "dev", ifname, "ingress", NULL); =20 @@ -405,7 +405,7 @@ virNetDevBandwidthSet(const char *ifname, goto cleanup; =20 virCommandFree(cmd); - cmd =3D virCommandNew(TC); + cmd =3D virCommandNew("tc"); /* Set filter to match all ingress traffic */ virCommandAddArgList(cmd, "filter", "add", "dev", ifname, "parent", "ffff:", "protocol", "all", "u32", "match", "= u32", @@ -448,13 +448,13 @@ virNetDevBandwidthClear(const char *ifname) if (!ifname) return 0; =20 - rootcmd =3D virCommandNew(TC); + rootcmd =3D virCommandNew("tc"); virCommandAddArgList(rootcmd, "qdisc", "del", "dev", ifname, "root", N= ULL); =20 if (virCommandRun(rootcmd, &dummy) < 0) ret =3D -1; =20 - ingresscmd =3D virCommandNew(TC); + ingresscmd =3D virCommandNew("tc"); virCommandAddArgList(ingresscmd, "qdisc", "del", "dev", ifname, "ingr= ess", NULL); =20 if (virCommandRun(ingresscmd, &dummy) < 0) @@ -593,7 +593,7 @@ virNetDevBandwidthPlug(const char *brname, net_bandwidth->in->peak : net_bandwidth->in->average); =20 - cmd1 =3D virCommandNew(TC); + cmd1 =3D virCommandNew("tc"); virCommandAddArgList(cmd1, "class", "add", "dev", brname, "parent", "1= :1", "classid", class_id, "htb", "rate", floor, "ceil", ceil, NULL); @@ -602,7 +602,7 @@ virNetDevBandwidthPlug(const char *brname, if (virCommandRun(cmd1, NULL) < 0) return -1; =20 - cmd2 =3D virCommandNew(TC); + cmd2 =3D virCommandNew("tc"); virCommandAddArgList(cmd2, "qdisc", "add", "dev", brname, "parent", class_id, "handle", qdisc_id, "sfq", "perturb", "10", NULL); @@ -644,7 +644,7 @@ virNetDevBandwidthUnplug(const char *brname, class_id =3D g_strdup_printf("1:%x", id); qdisc_id =3D g_strdup_printf("%x:", id); =20 - cmd1 =3D virCommandNew(TC); + cmd1 =3D virCommandNew("tc"); virCommandAddArgList(cmd1, "qdisc", "del", "dev", brname, "handle", qdisc_id, NULL); =20 @@ -657,7 +657,7 @@ virNetDevBandwidthUnplug(const char *brname, NULL, true, false) < 0) return -1; =20 - cmd2 =3D virCommandNew(TC); + cmd2 =3D virCommandNew("tc"); virCommandAddArgList(cmd2, "class", "del", "dev", brname, "classid", class_id, NULL); =20 @@ -698,7 +698,7 @@ virNetDevBandwidthUpdateRate(const char *ifname, bandwidth->in->peak : bandwidth->in->average); =20 - cmd =3D virCommandNew(TC); + cmd =3D virCommandNew("tc"); virCommandAddArgList(cmd, "class", "change", "dev", ifname, "classid", class_id, "htb", "rate", rate, "ceil", ceil, NULL); @@ -772,7 +772,7 @@ virNetDevBandwidthSetRootQDisc(const char *ifname, /* Ideally, we would have a netlink implementation and just * call it here. But honestly, I tried and failed miserably. * Fallback to spawning tc. */ - cmd =3D virCommandNewArgList(TC, "qdisc", "add", "dev", ifname, + cmd =3D virCommandNewArgList("tc", "qdisc", "add", "dev", ifname, "root", "handle", "0:", qdisc, NULL); =20 @@ -811,7 +811,7 @@ virNetDevBandWidthAddTxFilterParentQdisc(const char *if= name, /* first check it the qdisc with handle 1: was already added for * this interface by someone else */ - testCmd =3D virCommandNew(TC); + testCmd =3D virCommandNew("tc"); virCommandAddArgList(testCmd, "qdisc", "show", "dev", ifname, "handle", "1:", NULL); virCommandSetOutputBuffer(testCmd, &testResult); @@ -826,7 +826,7 @@ virNetDevBandWidthAddTxFilterParentQdisc(const char *if= name, */ if (!(testResult && strstr(testResult, "qdisc") && strstr(testResult, = " 1: "))) { /* didn't find qdisc in output, so we need to add one */ - g_autoptr(virCommand) addCmd =3D virCommandNew(TC); + g_autoptr(virCommand) addCmd =3D virCommandNew("tc"); =20 virCommandAddArgList(addCmd, "qdisc", "add", "dev", ifname, "root", "handle", "1:", "htb", "default", diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index b7cf546d9f..9624da9b96 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -145,13 +145,13 @@ mymain(void) DO_TEST_SET("" " " "", - TC " qdisc del dev eth0 root\n" - TC " qdisc del dev eth0 ingress\n" - TC " qdisc show dev eth0 handle 1:\n" - TC " qdisc add dev eth0 root handle 1: htb default 1\n" - TC " class add dev eth0 parent 1: classid 1:1 htb rate 102= 4kbps quantum 87\n" - TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 1= 0\n" - TC " filter add dev eth0 parent 1:0 protocol all prio 1 ha= ndle 1 fw flowid 1\n", + "tc qdisc del dev eth0 root\n" + "tc qdisc del dev eth0 ingress\n" + "tc qdisc show dev eth0 handle 1:\n" + "tc qdisc add dev eth0 root handle 1: htb default 1\n" + "tc class add dev eth0 parent 1: classid 1:1 htb rate 1024= kbps quantum 87\n" + "tc qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10= \n" + "tc filter add dev eth0 parent 1:0 protocol all prio 1 han= dle 1 fw flowid 1\n", "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\= "'\n" "ovs-vsctl --timeout=3D5 set port eth0 qos=3D@qos1 'extern= al-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\"' --" @@ -163,10 +163,10 @@ mymain(void) DO_TEST_SET("" " " "", - TC " qdisc del dev eth0 root\n" - TC " qdisc del dev eth0 ingress\n" - TC " qdisc add dev eth0 ingress\n" - TC " filter add dev eth0 parent ffff: protocol all u32 mat= ch u32 0 0" + "tc qdisc del dev eth0 root\n" + "tc qdisc del dev eth0 ingress\n" + "tc qdisc add dev eth0 ingress\n" + "tc filter add dev eth0 parent ffff: protocol all u32 matc= h u32 0 0" " police rate 1024kbps burst 1024kb mtu 64kb drop flowi= d :1\n", "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\= "'\n" @@ -176,15 +176,15 @@ mymain(void) " " " " "", - TC " qdisc del dev eth0 root\n" - TC " qdisc del dev eth0 ingress\n" - TC " qdisc show dev eth0 handle 1:\n" - TC " qdisc add dev eth0 root handle 1: htb default 1\n" - TC " class add dev eth0 parent 1: classid 1:1 htb rate 1kb= ps ceil 2kbps burst 4kb quantum 1\n" - TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 1= 0\n" - TC " filter add dev eth0 parent 1:0 protocol all prio 1 ha= ndle 1 fw flowid 1\n" - TC " qdisc add dev eth0 ingress\n" - TC " filter add dev eth0 parent ffff: protocol all u32 mat= ch u32 0 0" + "tc qdisc del dev eth0 root\n" + "tc qdisc del dev eth0 ingress\n" + "tc qdisc show dev eth0 handle 1:\n" + "tc qdisc add dev eth0 root handle 1: htb default 1\n" + "tc class add dev eth0 parent 1: classid 1:1 htb rate 1kbp= s ceil 2kbps burst 4kb quantum 1\n" + "tc qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10= \n" + "tc filter add dev eth0 parent 1:0 protocol all prio 1 han= dle 1 fw flowid 1\n" + "tc qdisc add dev eth0 ingress\n" + "tc filter add dev eth0 parent ffff: protocol all u32 matc= h u32 0 0" " police rate 5kbps burst 7kb mtu 64kb drop flowid :1\n= ", "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd qos 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth0\= "'\n" @@ -199,15 +199,15 @@ mymain(void) " " " " "", - TC " qdisc del dev eth0 root\n" - TC " qdisc del dev eth0 ingress\n" - TC " qdisc show dev eth0 handle 1:\n" - TC " qdisc add dev eth0 root handle 1: htb default 1\n" - TC " class add dev eth0 parent 1: classid 1:1 htb rate 429= 4967295kbps quantum 366503875\n" - TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 1= 0\n" - TC " filter add dev eth0 parent 1:0 protocol all prio 1 ha= ndle 1 fw flowid 1\n" - TC " qdisc add dev eth0 ingress\n" - TC " filter add dev eth0 parent ffff: protocol all u32 mat= ch" + "tc qdisc del dev eth0 root\n" + "tc qdisc del dev eth0 ingress\n" + "tc qdisc show dev eth0 handle 1:\n" + "tc qdisc add dev eth0 root handle 1: htb default 1\n" + "tc class add dev eth0 parent 1: classid 1:1 htb rate 4294= 967295kbps quantum 366503875\n" + "tc qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10= \n" + "tc filter add dev eth0 parent 1:0 protocol all prio 1 han= dle 1 fw flowid 1\n" + "tc qdisc add dev eth0 ingress\n" + "tc filter add dev eth0 parent ffff: protocol all u32 matc= h" " u32 0 0 police rate 4294967295kbps burst 4194303kb mt= u 64kb" " drop flowid :1\n", "ovs-vsctl --timeout=3D5 --no-heading --columns=3D_uuid fi= nd queue 'external-ids:vm-id=3D\"" VMUUID "\"' 'external-ids:ifname=3D\"eth= 0\"'\n" --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925681; cv=none; d=zohomail.com; s=zohoarc; b=KM3CilB8Jf3ISnEYK+cC3OseGWmog6jxt64Ob3PjcaXJTCIgK5PfRJFEy/ZtJQSucgJNC5TI2WZB6+KjQitdnJJ5Q2owTcciz5fCKYb4U0Tye/50wlP3NDONBxnoE6KWwYuP9s1m0dBfFzo/58K1kKyk7hCB1048VdyD+unmJ1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925681; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=gQIWS3/zlIbuUZjDtnI+h4810QiAlBqncj6srJGWoI8=; b=aLQ/z6hsN049AoLM0jhwdMemr+RjWBwXY+bj15Ki+dOKNpH+MsjTYpgD1MXxFJZ7AHfdtwF6kL52GlOxWa+YQcUIV7mjjQSHwG8vNeiMXvpCNLFvBtxnYDlsVDz1j+LPojopgYi7lxK1WHBPtaia9zMru5KMqVvejl+XDqcFHv4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925681806630.4892506277247; Tue, 29 Apr 2025 04:21:21 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 32AD71294; Tue, 29 Apr 2025 07:21:21 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D2F1F146F; Tue, 29 Apr 2025 07:15:17 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3F86312CE; Tue, 29 Apr 2025 07:15:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 427A91425 for ; Tue, 29 Apr 2025 07:14:45 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-oZyceN2hNruOS44x2Iv6Rw-1; Tue, 29 Apr 2025 07:14:43 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4E1019560BB for ; Tue, 29 Apr 2025 11:14:42 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DB2BB195608D; Tue, 29 Apr 2025 11:14:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HJjB3662ssLnqoZSpR9Gi24OhhjoXhc/FqCT0ufRW1Q=; b=PpNYfisqRq8smTQyxshNbf9mzzqI7BYd/ej3VYhrQ4vjPPlhaXIYIEQ20uJfOngk+7xThr Xtb8e44jUX2S29nGqktxdvmdl7iNDH2apBWEZJX0BtYB3YvQ/DrUQgPciLSczOQQIeNYVP oYCA6tCSSxIX3sR3HcRQyug3IO/z1EY= X-MC-Unique: oZyceN2hNruOS44x2Iv6Rw-1 X-Mimecast-MFC-AGG-ID: oZyceN2hNruOS44x2Iv6Rw_1745925282 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 17/20] meson: stop setting conf var for optional programs Date: Tue, 29 Apr 2025 12:14:17 +0100 Message-ID: <20250429111420.1748521-18-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: V6esU5Gfsj9IE9iGki-lkksBzMgjQgYlNc1BO2RMISE_1745925282 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IM5XSALDHLMDYFVEXVKKRP66DWMF23LX X-Message-ID-Hash: IM5XSALDHLMDYFVEXVKKRP66DWMF23LX X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925683171019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 There is no reference to AUGPARSE, BLACK, FLAKE8, PDWTAGS or PYTEST conf variables anywhere, only the ${name}_prog meson variables are used. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index 4223f5ab86..68b955a02c 100644 --- a/meson.build +++ b/meson.build @@ -864,7 +864,6 @@ foreach name : optional_programs missing_optional_programs +=3D [ name ] endif =20 - conf.set_quoted(varname.to_upper(), prog_path) set_variable('@0@_prog'.format(varname), prog) endforeach =20 --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925754; cv=none; d=zohomail.com; s=zohoarc; b=cbaGgKxwDfMbQG88riAA8I2WZF/ybKpe0NC76WPwxSUmhWu014jeG84zePLynt4cglXVXxnxxMXcGiMguzYR+hCEbJXkEdpmmpuijralnl8rs0Dq9+hVaTAigz3EYUphECYHIble6ZFY3OLGfR1yTO7eR+MuguInIETXb6/ZaTU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925754; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=ur5dj97kv1bM2hocdlFJW9Uwnz1yNd6FEAzWvj4Kb3U=; b=m5cfrnL/prLWLL0L/7uqwpBHqIgGrMFd5S/Ddc9NpRGrfgAHgQmrW5O0axn7XXo5N9pp5QKp8uVv3PiuK63owY4q+5ecXs8Gb+PMUs/2ou+Hm5vbZs2prC1CFJZ4NPaXOBa9+FnHR/EPzezgJmK5WN9fob0SDsaCuTULkzYAP/k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174592575486690.65372899460681; Tue, 29 Apr 2025 04:22:34 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 475D714C3; Tue, 29 Apr 2025 07:22:34 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D1D2D1477; Tue, 29 Apr 2025 07:15:22 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 262851292; Tue, 29 Apr 2025 07:15:08 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 1220313CD for ; Tue, 29 Apr 2025 07:14:47 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-124-qE760zy3P7OeHyS-DceQ_A-1; Tue, 29 Apr 2025 07:14:45 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 32DB61800374 for ; Tue, 29 Apr 2025 11:14:44 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3E3AB195608D; Tue, 29 Apr 2025 11:14:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BlM/Igi35HSrkqKSnQMT2+DK6N7imPHKmPbWqr6dpEA=; b=XorsUXNZOnJF1bIM5J8bRrV9/tDUzyheRob3mfyRS0gPImQPOjNjdlxHkfauWdSDeTuJPI jfK46HEkWWQD90Ra6q9+stwCZcv9Hbq3vDxH+vdntQQGCsi6L4Ds0RFUvrpA/8HMWmSAxy u+TWL3epludndTe+nTZhQM1vXpWAGZA= X-MC-Unique: qE760zy3P7OeHyS-DceQ_A-1 X-Mimecast-MFC-AGG-ID: qE760zy3P7OeHyS-DceQ_A_1745925284 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 18/20] storage: stop hardcoding LVM tool paths Date: Tue, 29 Apr 2025 12:14:18 +0100 Message-ID: <20250429111420.1748521-19-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: LQP_caNBchhxqV-yETxCCinmGbCc4UqZfplA6eTEr0g_1745925284 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: LX6V7WJQML765GFLUUFJJ6BJXGIVUBVU X-Message-ID-Hash: LX6V7WJQML765GFLUUFJJ6BJXGIVUBVU X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925755612019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Change the mesonm rules to always enable the LVM driver if on a Linux host, unless the meson options say not to. The virCommand APIs will return suitable runtime errors if the tools are not installed. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- meson.build | 30 +++++---------------------- src/locking/lock_driver_lockd.c | 4 ++-- src/storage/storage_backend_logical.c | 24 ++++++++++----------- 3 files changed, 19 insertions(+), 39 deletions(-) diff --git a/meson.build b/meson.build index 68b955a02c..e23777819d 100644 --- a/meson.build +++ b/meson.build @@ -1826,32 +1826,12 @@ if conf.has('WITH_LIBVIRTD') error('Need libiscsi for iscsi-direct storage driver') endif =20 - if not get_option('storage_lvm').disabled() + if not get_option('storage_lvm').disabled() and host_machine.system() = =3D=3D 'linux' lvm_enable =3D true - lvm_progs =3D [ - 'pvcreate', 'vgcreate', 'lvcreate', - 'pvremove', 'vgremove', 'lvremove', - 'lvchange', 'vgchange', 'vgscan', - 'pvs', 'vgs', 'lvs', - ] - foreach name : lvm_progs - set_variable( - '@0@_prog'.format(name), - find_program(name, required: get_option('storage_lvm'), dirs: libv= irt_sbin_path) - ) - if not get_variable('@0@_prog'.format(name)).found() - lvm_enable =3D false - endif - endforeach - - if lvm_enable - use_storage =3D true - conf.set('WITH_STORAGE_LVM', 1) - - foreach name : lvm_progs - conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(na= me)).full_path()) - endforeach - endif + use_storage =3D true + conf.set('WITH_STORAGE_LVM', 1) + elif get_option('storage_lvm').enabled() + error('Linux host needed for LVM storage driver') endif =20 if not get_option('storage_mpath').disabled() and host_machine.system() = =3D=3D 'linux' and devmapper_dep.found() diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lock= d.c index 0b6c720477..a3bb285eec 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -433,7 +433,7 @@ static int virLockManagerLockDaemonNew(virLockManager *= lock, } =20 =20 -#ifdef LVS +#ifdef __linux__ static int virLockManagerGetLVMKey(const char *path, char **key) @@ -446,7 +446,7 @@ virLockManagerGetLVMKey(const char *path, int ret =3D -1; g_autoptr(virCommand) cmd =3D NULL; =20 - cmd =3D virCommandNewArgList(LVS, "--noheadings", + cmd =3D virCommandNewArgList("lvs", "--noheadings", "--unbuffered", "--nosuffix", "--options", "uuid", path, NULL diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_ba= ckend_logical.c index 6acbc37f18..51e9337820 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -49,7 +49,7 @@ virStorageBackendLogicalSetActive(virStoragePoolObj *pool, g_autoptr(virCommand) cmd =3D NULL; int ret; =20 - cmd =3D virStorageBackendLogicalChangeCmd(VGCHANGE, def, on); + cmd =3D virStorageBackendLogicalChangeCmd("vgchange", def, on); =20 virObjectUnlock(pool); ret =3D virCommandRun(cmd, NULL); @@ -70,7 +70,7 @@ virStorageBackendLogicalRemoveDevice(const char *path) { g_autoptr(virCommand) cmd =3D NULL; =20 - cmd =3D virCommandNewArgList(PVREMOVE, path, NULL); + cmd =3D virCommandNewArgList("pvremove", path, NULL); if (virCommandRun(cmd, NULL) < 0) VIR_INFO("Failed to pvremove logical device '%s'", path); } @@ -100,7 +100,7 @@ virStorageBackendLogicalInitializeDevice(const char *pa= th) * Initialize the physical volume because vgcreate is not * clever enough todo this for us :-( */ - pvcmd =3D virCommandNewArgList(PVCREATE, path, NULL); + pvcmd =3D virCommandNewArgList("pvcreate", path, NULL); return virCommandRun(pvcmd, NULL); } =20 @@ -380,7 +380,7 @@ virStorageBackendLogicalFindLVs(virStoragePoolObj *pool, }; g_autoptr(virCommand) cmd =3D NULL; =20 - cmd =3D virCommandNewArgList(LVS, + cmd =3D virCommandNewArgList("lvs", "--separator", "#", "--noheadings", "--units", "b", @@ -483,11 +483,11 @@ virStorageBackendLogicalGetPoolSources(virStoragePool= SourceList *sourceList) * that might be hanging around, so if this fails for some reason, the * worst that happens is that scanning doesn't pick everything up */ - vgcmd =3D virCommandNew(VGSCAN); + vgcmd =3D virCommandNew("vgscan"); if (virCommandRun(vgcmd, NULL) < 0) VIR_WARN("Failure when running vgscan to refresh physical volumes"= ); =20 - pvcmd =3D virCommandNewArgList(PVS, + pvcmd =3D virCommandNewArgList("pvs", "--noheadings", "-o", "pv_name,vg_name", NULL, NULL); @@ -658,7 +658,7 @@ virStorageBackendLogicalBuildPool(virStoragePoolObj *po= ol, VIR_STORAGE_POOL_BUILD_NO_OVERWRITE, cleanup); =20 - vgcmd =3D virCommandNewArgList(VGCREATE, def->source.name, NULL); + vgcmd =3D virCommandNewArgList("vgcreate", def->source.name, NULL); =20 for (i =3D 0; i < def->source.ndevice; i++) { const char *path =3D def->source.devices[i].path; @@ -720,7 +720,7 @@ virStorageBackendLogicalRefreshPool(virStoragePoolObj *= pool) if (virStorageBackendLogicalFindLVs(pool, NULL) < 0) return -1; =20 - cmd =3D virCommandNewArgList(VGS, + cmd =3D virCommandNewArgList("vgs", "--separator", ":", "--noheadings", "--units", "b", @@ -769,7 +769,7 @@ virStorageBackendLogicalDeletePool(virStoragePoolObj *p= ool, virCheckFlags(0, -1); =20 /* first remove the volume group */ - cmd =3D virCommandNewArgList(VGREMOVE, + cmd =3D virCommandNewArgList("vgremove", "-f", def->source.name, NULL); if (virCommandRun(cmd, NULL) < 0) @@ -795,8 +795,8 @@ virStorageBackendLogicalDeleteVol(virStoragePoolObj *po= ol G_GNUC_UNUSED, =20 virWaitForDevices(); =20 - lvchange_cmd =3D virCommandNewArgList(LVCHANGE, "-aln", vol->target.pa= th, NULL); - lvremove_cmd =3D virCommandNewArgList(LVREMOVE, "-f", vol->target.path= , NULL); + lvchange_cmd =3D virCommandNewArgList("lvchange", "-aln", vol->target.= path, NULL); + lvremove_cmd =3D virCommandNewArgList("lvremove", "-f", vol->target.pa= th, NULL); =20 if (virCommandRun(lvremove_cmd, NULL) < 0) { if (virCommandRun(lvchange_cmd, NULL) < 0) { @@ -825,7 +825,7 @@ virStorageBackendLogicalLVCreate(virStorageVolDef *vol, return -1; } =20 - cmd =3D virCommandNewArgList(LVCREATE, + cmd =3D virCommandNewArgList("lvcreate", "--name", vol->name, NULL); virCommandAddArg(cmd, "-L"); --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925771; cv=none; d=zohomail.com; s=zohoarc; b=T5aRh/pifLS8R5VTMdZIiy1LPkuCLTZuf2p/GCpGuda6Zm6mQq9iOS+08JceeWUoPIDaN1phi1RSp84dTNnBofgfOTPKC2uG60/Ysk9CTROdORpUkJ5iz367U38BGQr9K1Zuw+84379eNGc2NcEV9pYqMsrZg2B7inu6fcY9qYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925771; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=7BLDM/ycwXsnpcARzy4jc11PtlUB/XC8rEiJwwjcq40=; b=eZZOVIR/kUlNbiDCAQ8qYAiJ/yyFY9VT/Pw11IdaZ927rLmtGHO58U/TUaIKYAo4k6MHW4x8TFtKjjWkY6j3GYBYv0+vnE/lJPkoV7QHNDOk7x9pCdM++dhalMxwYlSr8mtk+8RctGB7Sx1c7k8lHcU/g5n+8Y25f6SFb7GLoDg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925771933718.9001927226869; Tue, 29 Apr 2025 04:22:51 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id EF1C81284; Tue, 29 Apr 2025 07:22:50 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id DF95F13D7; Tue, 29 Apr 2025 07:15:25 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id AEF631391; Tue, 29 Apr 2025 07:15:08 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C2015142F for ; Tue, 29 Apr 2025 07:14:47 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-WzBj2SKYOZyOvpn2fwewFw-1; Tue, 29 Apr 2025 07:14:46 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 505AE19560A5 for ; Tue, 29 Apr 2025 11:14:45 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 76287195608D; Tue, 29 Apr 2025 11:14:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QRISucJxMzPQjqLP3zKGhMWb4Yq+P+fTvb8XrIyh0UI=; b=aMsMu5HVkcG3DvaIGEeKXQT0v2tf5zzaAi7YpTAYVrqAioWX15psgNXKzDgpA1Nfodv+VP BeVrO2GtCQ91Ftp3fADTNK30YylyyLXPwhNXrZyE4wjS2vhsavuN7/mZ1YhauPeA5O9N3j w8UoQkPr7bZH9SOoLAaPp+wXlNgbCzg= X-MC-Unique: WzBj2SKYOZyOvpn2fwewFw-1 X-Mimecast-MFC-AGG-ID: WzBj2SKYOZyOvpn2fwewFw_1745925285 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 19/20] util: stop hardcoding pkttyagent path Date: Tue, 29 Apr 2025 12:14:19 +0100 Message-ID: <20250429111420.1748521-20-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WZp1eriAIl8BG4RWHBOeq2Sit3tvmwMaE0beSgR-wd0_1745925285 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: SRSZY4QEYNOG3WL2O44E32VIT25QSFHB X-Message-ID-Hash: SRSZY4QEYNOG3WL2O44E32VIT25QSFHB X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925774931019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find it in $PATH Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/util/virpolkit.c | 8 +++++--- src/util/virpolkit.h | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c index 0a637db9ba..81fa5d0989 100644 --- a/src/util/virpolkit.c +++ b/src/util/virpolkit.c @@ -189,7 +189,7 @@ virPolkitAgentCreate(void) =20 agent =3D g_new0(virPolkitAgent, 1); =20 - agent->cmd =3D virCommandNewArgList(PKTTYAGENT, "--process", NULL); + agent->cmd =3D virCommandNewArgList("pkttyagent", "--process", NULL); =20 virCommandAddArgFormat(agent->cmd, "%lld", (long long int) getpid()); virCommandAddArg(agent->cmd, "--notify-fd"); @@ -234,11 +234,13 @@ virPolkitAgentAvailable(void) { const char *termid =3D ctermid(NULL); VIR_AUTOCLOSE fd =3D -1; + g_autofree char *agent =3D NULL; =20 - if (!virFileIsExecutable(PKTTYAGENT)) + if (!termid) return false; =20 - if (!termid) + agent =3D virFindFileInPath("pkttyagent"); + if (!agent) return false; =20 /* diff --git a/src/util/virpolkit.h b/src/util/virpolkit.h index 7bcd040e5e..afc0005365 100644 --- a/src/util/virpolkit.h +++ b/src/util/virpolkit.h @@ -24,8 +24,6 @@ #include "internal.h" #include "vircommand.h" =20 -#define PKTTYAGENT "/usr/bin/pkttyagent" - int virPolkitCheckAuth(const char *actionid, pid_t pid, unsigned long long startTime, --=20 2.49.0 From nobody Tue Sep 9 03:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1745925795; cv=none; d=zohomail.com; s=zohoarc; b=iyAcXgjWW/0bmT0wubIXZlKx5C+xDMmk6BHmnTc7duD4p6emlAPdKZlPE7wj5mBDOL1YVepZLCSNCCb7N9o/kXJNZ8m6CAtjiYeyUpGezh8vf1YlvKIaKqhFBsdyZqqWRBH2gaG7nUq2Q3zFMkuWXcUWC8JOKjhS2aMJ1m+2l8o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745925795; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=BOVE9tga+AG85gbLKhnTVq+xGglX28bQ4n80V5YH9hM=; b=gMIxJATpdVOH0s9ppPrQmRjvcBVlmB/y5lg/ddRnmB8PK2jCBXhAPmToDagII9lSuYpNgicO1Wa/LnJVxvtn3wei+m2ia6IoNu2CtYy5hQORwIojIV0vClesqV3Mcq0RjirTgPPKDRuM+Xreb9LcUspCVe4Vq5M6vk2e51Aix5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1745925795293522.2654709764643; Tue, 29 Apr 2025 04:23:15 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5866314CD; Tue, 29 Apr 2025 07:23:14 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 288D91393; Tue, 29 Apr 2025 07:15:28 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B6AAA1315; Tue, 29 Apr 2025 07:15:09 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 033EB13EB for ; Tue, 29 Apr 2025 07:14:48 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-176-mFFV-ar6OHe1gZV1en-iuw-1; Tue, 29 Apr 2025 07:14:47 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 84A92180099C for ; Tue, 29 Apr 2025 11:14:46 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.98]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ADFD7195608D; Tue, 29 Apr 2025 11:14:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745925288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=34HDV2yWxf1iip2XYdCTZ93+txGsTQBWFNeBlg1BQ/0=; b=A9VIoBgx0ZvM1WkZZduZ/WRTWO/rnGG+hThCaJbTf3HehZPsnPRB6eGKxfF87JAlYKYERy 4bYVc6yUvm3zidiTpSH39EXkr31soeoh60mqAgYht0/NarItiaAEBxOpuG1eZHFFX3ABIs YOFeQzMvagEtJ+a0FVyhZFMGjCUWpJ0= X-MC-Unique: mFFV-ar6OHe1gZV1en-iuw-1 X-Mimecast-MFC-AGG-ID: mFFV-ar6OHe1gZV1en-iuw_1745925286 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 20/20] openvz: stop hardcoding vzlist/vzctl/vzmigrate paths Date: Tue, 29 Apr 2025 12:14:20 +0100 Message-ID: <20250429111420.1748521-21-berrange@redhat.com> In-Reply-To: <20250429111420.1748521-1-berrange@redhat.com> References: <20250429111420.1748521-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: pCziAu5OHw6pEdWrJYmLn7MrKf69-ieRW91ryxn-QxY_1745925286 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: KIIMCGIF7RVEGBYW2OQJERRSDDH5YBZ2 X-Message-ID-Hash: KIIMCGIF7RVEGBYW2OQJERRSDDH5YBZ2 X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1745925796695019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Allow virCommand to find them in $PATH, which will always include 'sbin' since the openvz driver only operates in system mode. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/openvz/openvz_conf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvz/openvz_conf.h b/src/openvz/openvz_conf.h index 9c3eff9aaf..83244ba60e 100644 --- a/src/openvz/openvz_conf.h +++ b/src/openvz/openvz_conf.h @@ -29,9 +29,9 @@ =20 =20 /* OpenVZ commands - Replace with wrapper scripts later? */ -#define VZLIST "/usr/sbin/vzlist" -#define VZCTL "/usr/sbin/vzctl" -#define VZMIGRATE "/usr/sbin/vzmigrate" +#define VZLIST "vzlist" +#define VZCTL "vzctl" +#define VZMIGRATE "vzmigrate" #define VZ_CONF_FILE "/etc/vz/vz.conf" =20 #define VZCTL_BRIDGE_MIN_VERSION ((3 * 1000 * 1000) + (0 * 1000) + 22 + 1) --=20 2.49.0