From nobody Tue Apr 23 11:05:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1631614585; cv=none; d=zohomail.com; s=zohoarc; b=mAs6qbmzlb34QseViT7olCIYzo/oyfqAO0/dUNC8LnmXySEkP2vjMsJ8bH8+QN8hEX/P+e4Ekni2Zyb1RL8G5DHejBEJS/pg4Z7z8UjvNYbMALxClgfTR//Wb+wkSARjG5ckZLpvXA1lFAsZ/x3CQ5lrypnEQG/BRUXhgNboqXo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631614585; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Zn9aeU2iXT67DfrS8OzvsT0En4oKP5bMVAgEJDVYpqM=; b=n/Hv3DBbzwRpAW0UAgg6cPs09ZVFvKA2eXrw+aORWSfTCofXHNZ7lw/9yIz5rEAZOulGFVK6M3/Pe9sZDdptYpGGYIyVtfj6w2OGBmZuzjBeG5uXTdq0o+k07k2em7BOXOMj2WssakHK/OwSNV6+5fzhK35akyd7IWhkL5nvMec= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1631614585019879.5133231518006; Tue, 14 Sep 2021 03:16:25 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-QeYJOV7nN0ywSIQOJTDy9w-1; Tue, 14 Sep 2021 06:16:22 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8D38F1922042; Tue, 14 Sep 2021 10:16:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D453C60C9F; Tue, 14 Sep 2021 10:16:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E11F51805989; Tue, 14 Sep 2021 10:16:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EAG7jn024880 for ; Tue, 14 Sep 2021 06:16:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 65C17100164A; Tue, 14 Sep 2021 10:16:07 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEF591002388 for ; Tue, 14 Sep 2021 10:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631614584; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Zn9aeU2iXT67DfrS8OzvsT0En4oKP5bMVAgEJDVYpqM=; b=ZBgT07BpqSGkGf1z3bmoxCMnoflxMrvq11rl9SC+k4furcL8bsvVRgMakmNZFFLX4Pne0/ VOA8/lammHPNXxizG65MMb/XXqI9oGQ8FT5aR3vnwK10uwJUCt9gvPZpXFW+13LxkmbEmV rnI2GI6Fm+vtHpbqj7vFUq6Gw7FOE4k= X-MC-Unique: QeYJOV7nN0ywSIQOJTDy9w-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/3] lib: Use $PROG instead of $PROG_PATH Date: Tue, 14 Sep 2021 12:15:59 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1631614585476100001 Content-Type: text/plain; charset="utf-8" Due to the way we detect programs at runtime there's no difference between $PROG and $PROG_PATH macros that come from meson-config.h. Either both are set to the path found during configure or both are set to just "$prog", e.g.: #define EBTABLES "/sbin/ebtables" #define EBTABLES_PATH "/sbin/ebtables" #define FLAKE8 "flake8" #define FLAKE8_PATH "flake8" Change those few places which use _PATH. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/util/virfirewall.c | 8 ++-- src/util/virnetdevip.c | 14 +++--- tests/virfirewalltest.c | 98 ++++++++++++++++++++--------------------- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index 9594192a7b..fb02992912 100644 --- a/src/util/virfirewall.c +++ b/src/util/virfirewall.c @@ -42,9 +42,9 @@ typedef struct _virFirewallGroup virFirewallGroup; VIR_ENUM_DECL(virFirewallLayerCommand); VIR_ENUM_IMPL(virFirewallLayerCommand, VIR_FIREWALL_LAYER_LAST, - EBTABLES_PATH, - IPTABLES_PATH, - IP6TABLES_PATH, + EBTABLES, + IPTABLES, + IP6TABLES, ); =20 struct _virFirewallRule { @@ -99,7 +99,7 @@ static int virFirewallValidateBackend(virFirewallBackend backend) { const char *commands[] =3D { - IPTABLES_PATH, IP6TABLES_PATH, EBTABLES_PATH + IPTABLES, IP6TABLES, EBTABLES }; size_t i; =20 diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 0ce8f5b536..2eacb64ebe 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -394,8 +394,8 @@ virNetDevIPAddrAdd(const char *ifname, return -1; } =20 -# ifdef IFCONFIG_PATH - cmd =3D virCommandNew(IFCONFIG_PATH); +# ifdef IFCONFIG + cmd =3D virCommandNew(IFCONFIG); virCommandAddArg(cmd, ifname); if (VIR_SOCKET_ADDR_IS_FAMILY(addr, AF_INET6)) virCommandAddArg(cmd, "inet6"); @@ -408,7 +408,7 @@ virNetDevIPAddrAdd(const char *ifname, virCommandAddArgList(cmd, "broadcast", bcaststr, NULL); virCommandAddArg(cmd, "alias"); # else - cmd =3D virCommandNew(IP_PATH); + cmd =3D virCommandNew(IP); virCommandAddArgList(cmd, "addr", "add", NULL); virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); if (peerstr) @@ -435,8 +435,8 @@ virNetDevIPAddrDel(const char *ifname, =20 if (!(addrstr =3D virSocketAddrFormat(addr))) return -1; -# ifdef IFCONFIG_PATH - cmd =3D virCommandNew(IFCONFIG_PATH); +# ifdef IFCONFIG + cmd =3D virCommandNew(IFCONFIG); virCommandAddArg(cmd, ifname); if (VIR_SOCKET_ADDR_IS_FAMILY(addr, AF_INET6)) virCommandAddArg(cmd, "inet6"); @@ -445,7 +445,7 @@ virNetDevIPAddrDel(const char *ifname, virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); virCommandAddArg(cmd, "-alias"); # else - cmd =3D virCommandNew(IP_PATH); + cmd =3D virCommandNew(IP); virCommandAddArgList(cmd, "addr", "del", NULL); virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); virCommandAddArgList(cmd, "dev", ifname, NULL); @@ -473,7 +473,7 @@ virNetDevIPRouteAdd(const char *ifname, return -1; if (!(gatewaystr =3D virSocketAddrFormat(gateway))) return -1; - cmd =3D virCommandNew(IP_PATH); + cmd =3D virCommandNew(IP); virCommandAddArgList(cmd, "route", "add", NULL); virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); virCommandAddArgList(cmd, "via", gatewaystr, "dev", ifname, diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c index ac039f3bbf..c6f4ca05e2 100644 --- a/tests/virfirewalltest.c +++ b/tests/virfirewalltest.c @@ -116,11 +116,11 @@ VIR_MOCK_WRAP_RET_ARGS(g_dbus_connection_call_sync, =20 if (fwBuf) { if (STREQ(type, "ipv4")) - virBufferAddLit(fwBuf, IPTABLES_PATH); + virBufferAddLit(fwBuf, IPTABLES); else if (STREQ(type, "ipv6")) - virBufferAddLit(fwBuf, IP6TABLES_PATH); + virBufferAddLit(fwBuf, IP6TABLES); else - virBufferAddLit(fwBuf, EBTABLES_PATH); + virBufferAddLit(fwBuf, EBTABLES); } =20 while (g_variant_iter_loop(iter, "s", &item)) { @@ -186,8 +186,8 @@ testFirewallSingleGroup(const void *opaque) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJEC= T\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -239,8 +239,8 @@ testFirewallRemoveRule(const void *opaque) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJEC= T\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data =3D opaque; virFirewallRule *fwrule; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); @@ -299,10 +299,10 @@ testFirewallManyGroups(const void *opaque G_GNUC_UNUS= ED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJEC= T\n" - IPTABLES_PATH " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\= n" - IPTABLES_PATH " -w -A OUTPUT --jump DROP\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n" + IPTABLES " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A OUTPUT --jump DROP\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -387,10 +387,10 @@ testFirewallIgnoreFailGroup(const void *opaque G_GNUC= _UNUSED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\= n" - IPTABLES_PATH " -w -A OUTPUT --jump DROP\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A OUTPUT --jump DROP\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -456,10 +456,10 @@ testFirewallIgnoreFailRule(const void *opaque G_GNUC_= UNUSED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\= n" - IPTABLES_PATH " -w -A OUTPUT --jump DROP\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -A OUTPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A OUTPUT --jump DROP\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -524,8 +524,8 @@ testFirewallNoRollback(const void *opaque G_GNUC_UNUSED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.255 --jump REJECT= \n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source 192.168.122.255 --jump REJECT\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -585,11 +585,11 @@ testFirewallSingleRollback(const void *opaque G_GNUC_= UNUSED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -D INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -D INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -D INPUT --source '!192.168.122.1' --jump REJEC= T\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -D INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -D INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -D INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -666,10 +666,10 @@ testFirewallManyRollback(const void *opaque G_GNUC_UN= USED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -D INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -D INPUT --source '!192.168.122.1' --jump REJEC= T\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -D INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -D INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -750,14 +750,14 @@ testFirewallChainedRollback(const void *opaque G_GNUC= _UNUSED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.127 --jump REJECT= \n" - IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJEC= T\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -D INPUT --source 192.168.122.127 --jump REJECT= \n" - IPTABLES_PATH " -w -D INPUT --source '!192.168.122.1' --jump REJEC= T\n" - IPTABLES_PATH " -w -D INPUT --source 192.168.122.255 --jump REJECT= \n" - IPTABLES_PATH " -w -D INPUT --source '!192.168.122.1' --jump REJEC= T\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source 192.168.122.127 --jump REJECT\n" + IPTABLES " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n" + IPTABLES " -w -A INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -D INPUT --source 192.168.122.127 --jump REJECT\n" + IPTABLES " -w -D INPUT --source '!192.168.122.1' --jump REJECT\n" + IPTABLES " -w -D INPUT --source 192.168.122.255 --jump REJECT\n" + IPTABLES " -w -D INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 @@ -892,11 +892,11 @@ testFirewallQueryHook(const char *const*args, int *status G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED) { - if (STREQ(args[0], IPTABLES_PATH) && + if (STREQ(args[0], IPTABLES) && STREQ(args[1], "-w") && STREQ(args[2], "-L")) { *output =3D g_strdup(TEST_FILTER_TABLE_LIST); - } else if (STREQ(args[0], IPTABLES_PATH) && + } else if (STREQ(args[0], IPTABLES) && STREQ(args[1], "-w") && STREQ(args[2], "-t") && STREQ(args[3], "nat") && @@ -943,15 +943,15 @@ testFirewallQuery(const void *opaque G_GNUC_UNUSED) int ret =3D -1; const char *actual =3D NULL; const char *expected =3D - IPTABLES_PATH " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.127 --jump REJECT= \n" - IPTABLES_PATH " -w -L\n" - IPTABLES_PATH " -w -t nat -L\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.130 --jump REJECT= \n" - IPTABLES_PATH " -w -A INPUT --source '!192.168.122.129' --jump REJ= ECT\n" - IPTABLES_PATH " -w -A INPUT --source '!192.168.122.129' --jump REJ= ECT\n" - IPTABLES_PATH " -w -A INPUT --source 192.168.122.128 --jump REJECT= \n" - IPTABLES_PATH " -w -A INPUT --source '!192.168.122.1' --jump REJEC= T\n"; + IPTABLES " -w -A INPUT --source 192.168.122.1 --jump ACCEPT\n" + IPTABLES " -w -A INPUT --source 192.168.122.127 --jump REJECT\n" + IPTABLES " -w -L\n" + IPTABLES " -w -t nat -L\n" + IPTABLES " -w -A INPUT --source 192.168.122.130 --jump REJECT\n" + IPTABLES " -w -A INPUT --source '!192.168.122.129' --jump REJECT\n" + IPTABLES " -w -A INPUT --source '!192.168.122.129' --jump REJECT\n" + IPTABLES " -w -A INPUT --source 192.168.122.128 --jump REJECT\n" + IPTABLES " -w -A INPUT --source '!192.168.122.1' --jump REJECT\n"; const struct testFirewallData *data =3D opaque; g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); =20 --=20 2.32.0 From nobody Tue Apr 23 11:05:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1631614599; cv=none; d=zohomail.com; s=zohoarc; b=ZEF4Oj7t+3YF7O7HugxYdTx9R6GsZIPxIq9teDW8PAgTdbIh+SuYcoIanJc3X/+dZDRJUUfmTwseChmcTIkbQzst/rJA93MtOapEOuKihRoJPzkAy5Wc78+BENprbohd8Ymy+KKTCXQjtGOnJMml13NzY3kCwp96HNCUHGQ+DAw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631614599; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=373D8k2tUQ9iQf9Ns777STG6fgDMLc3bw8+shcEE3u4=; b=HkuQ/ll7b7DHA1ur4XqvDnAExYFjQrxwGCuiozg+3h+ImGpnuSSBLEMSs2AJCkkVWf8cY4mNTOFCxZCF6K0ayAcjIeXUKtl4dRm/EfxmckmSr6yOk5egnT5zTaliL5WlHqyvHnXaCQ/rI2rhuuKbif0t7GrFxK3oSENCJMYxvh8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1631614599095383.4957314148246; Tue, 14 Sep 2021 03:16:39 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-134-9K6BepyCPuWXIIRR8mRBbg-1; Tue, 14 Sep 2021 06:16:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E6D550750; Tue, 14 Sep 2021 10:16:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E14CF5C25A; Tue, 14 Sep 2021 10:16:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AEEC14EA2F; Tue, 14 Sep 2021 10:16:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EAG8s7024885 for ; Tue, 14 Sep 2021 06:16:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 332BC10027C4; Tue, 14 Sep 2021 10:16:08 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id B23CD10016FB for ; Tue, 14 Sep 2021 10:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631614597; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=373D8k2tUQ9iQf9Ns777STG6fgDMLc3bw8+shcEE3u4=; b=R+P0qLEXnfBzRcrGFLcQNbVpngdVhuhhX0qkkRyfpkERl3UyVBVfyClxaCkrBT3cKp1K1P 17IbXbrQcvgRGjAloIwGwpZrK3ZEeJh1sWH8glZUz9f7niTBlwZovlVK3wO/lPaKqm1IlF me77F1vVXeBzA8W4OdXUuaeLadSZDWg= X-MC-Unique: 9K6BepyCPuWXIIRR8mRBbg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/3] meson: Don't set $PROG_PATH macros Date: Tue, 14 Sep 2021 12:16:00 +0200 Message-Id: <40eaf660845ac0098c59453a359746c1e7084581.1631614480.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1631614600754100001 Content-Type: text/plain; charset="utf-8" Now, that there is no user of $PROG_PATH macros the meson script can be changed so that it doesn't set those macros. It's redundant as $PROG macro contains the same value. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- meson.build | 2 -- 1 file changed, 2 deletions(-) diff --git a/meson.build b/meson.build index 9d493ccd9e..77ee60977d 100644 --- a/meson.build +++ b/meson.build @@ -802,7 +802,6 @@ foreach name : required_programs prog =3D find_program(name, dirs: libvirt_sbin_path) varname =3D name.underscorify() conf.set_quoted(varname.to_upper(), prog.path()) - conf.set_quoted('@0@_PATH'.format(varname.to_upper()), prog.path()) set_variable('@0@_prog'.format(varname), prog) endforeach =20 @@ -848,7 +847,6 @@ foreach name : optional_programs endif =20 conf.set_quoted(varname.to_upper(), prog_path) - conf.set_quoted('@0@_PATH'.format(varname.to_upper()), prog_path) set_variable('@0@_prog'.format(varname), prog) endforeach =20 --=20 2.32.0 From nobody Tue Apr 23 11:05:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1631614585; cv=none; d=zohomail.com; s=zohoarc; b=AP+WHrL/h1/lQl5II0oIINIjeVs+9zwwOrqk++tlNtvrY2oad+6EUrS+hKBWEaOpcoUNYL62Q/LZyv5T5VWlL5HjX57GV+IT3v95bhDCxcYi0XQ2/qTnfEpTGl5kSeR3pr0+Bu6IfXn/ummxQU3HXmL8nP/buwxkyTgm2/wXDf4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631614585; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MgpeMhBsknMwoNb9rSVVeIU2JU54qHVanTZL6g4xYCw=; b=fNkTkuYoTtBdkTn16/CPcfQXrC9+j1UyFou0VtV+8mtBGtSo3HKdiLrdNVHh8A5q1Ctgt4Rd7f5CgUIlzr7awi8VvtofDWdXxUY70SQIMG6JzIGniU4HCza15JHah04A5x/odWfl3RIu5yolu+CCLoqcqsF3XqLBbkBSNK/AiDA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 163161458546764.80827096633823; Tue, 14 Sep 2021 03:16:25 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237--8VXRy01NvC-0R0QgF9B0Q-1; Tue, 14 Sep 2021 06:16:22 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A4E07101F7A4; Tue, 14 Sep 2021 10:16:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D062A5C25A; Tue, 14 Sep 2021 10:16:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 39BBE1806D02; Tue, 14 Sep 2021 10:16:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EAG9x3024895 for ; Tue, 14 Sep 2021 06:16:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 018B61007607; Tue, 14 Sep 2021 10:16:09 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id 803CF10027C4 for ; Tue, 14 Sep 2021 10:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631614584; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MgpeMhBsknMwoNb9rSVVeIU2JU54qHVanTZL6g4xYCw=; b=GVdah8hAlQ27GduKyIrumoSbDYX/Iw4GjdoXTqvasroND1tS8/SkFg4IyITUassHfgLfUK SufYQEtMZzm9EVs8oHc9J5EIKW7uwt+rImZU2Lg1ZBumr4Ed1V9kgk28Dzhh9BJBrIRImE xayG29WvUBHAd5PYH7xYAX5bFKQDurc= X-MC-Unique: -8VXRy01NvC-0R0QgF9B0Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/3] meson: Enable ZFS storage backend more often Date: Tue, 14 Sep 2021 12:16:01 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1631614587396100003 Content-Type: text/plain; charset="utf-8" Currently, the ZFS storage backend is enabled only if both zfs and zpool binaries were found during configure phase. This is not consistent with our attempts to move dependencies on binaries from compile to runtime. And also it is inconsistent with other backends, e.g. vstorage. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- meson.build | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 77ee60977d..488490181f 100644 --- a/meson.build +++ b/meson.build @@ -1947,24 +1947,24 @@ if conf.has('WITH_LIBVIRTD') endif =20 if not get_option('storage_zfs').disabled() - zfs_enable =3D true foreach name : [ 'zfs', 'zpool' ] set_variable( '@0@_prog'.format(name), find_program(name, required: get_option('storage_zfs'), dirs: libv= irt_sbin_path) ) - if not get_variable('@0@_prog'.format(name)).found() - zfs_enable =3D false - endif endforeach =20 - if zfs_enable - use_storage =3D true - conf.set('WITH_STORAGE_ZFS', 1) - foreach name : [ 'zfs', 'zpool' ] - conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(na= me)).path()) - endforeach - endif + use_storage =3D true + conf.set('WITH_STORAGE_ZFS', 1) + foreach name : [ 'zfs', 'zpool' ] + prog_var =3D get_variable('@0@_prog'.format(name)) + if prog_var.found() + prog_path =3D prog_var.path() + else + prog_path =3D name + endif + conf.set_quoted(name.to_upper(), prog_path) + endforeach endif endif =20 --=20 2.32.0