From nobody Wed May 8 02:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1638977581; cv=none; d=zohomail.com; s=zohoarc; b=S4BKRFehIrJhfwJTPDw0ODbr3TJc/dBwyy8ZHxTLP4eZLIXLDkOLwmEUNpuuXXGwV/ln9G29RWKJgWw778+7bvQ04tTNScPBIfqbmPmPWDKvEKW1sK2DWPEaONblieMUSGzkcNXU7/elBfaMEHPss1t9+24UoDRowehZErYYPxI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638977581; 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=9IuM/oB9qABH7nB5gznuxugteU9l48NNX9MoR6FEdAU=; b=Yvwandg3wugkTdsTgisCzs89rMxb+V6uMTTlsGe1v03xfwm2xHdLxTYCVzkinS9rZIm9hTzYkd6JIOGIKeLIVxECm7nvdJCvek3oGwkZy9kD3bluRMFaJkQvVPaomLNXACqjcm5yUlzg91ysvJ1Kv9bxQQNm2sUFsARrRfJtHdA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1638977581707992.2022924857209; Wed, 8 Dec 2021 07:33:01 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-439-BtULbbmKP6yELXGvoRUZSQ-1; Wed, 08 Dec 2021 10:32:58 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79004100CE83; Wed, 8 Dec 2021 15:32:53 +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 5B58145D75; Wed, 8 Dec 2021 15:32:53 +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 1EED94BB7C; Wed, 8 Dec 2021 15:32:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B8FTUrQ032075 for ; Wed, 8 Dec 2021 10:29:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id B0827794DC; Wed, 8 Dec 2021 15:29:30 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 385A6794DB for ; Wed, 8 Dec 2021 15:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638977580; 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=9IuM/oB9qABH7nB5gznuxugteU9l48NNX9MoR6FEdAU=; b=Y3wCVx7r2rVEyyAEeWBhxN/V+J15KB7qzhoYH+xHWAnBoHQKdu5FgkHd5UrZUsU4tMrUGx x5wXcmMRKl0EZOnAlDmUfVvmIluwppn2kYS9LU3SO0fop+URivEMPxpoYaTIkQKnu8FVC8 jDhjxxBel7ktw7dKie74PtmF2CCscqs= X-MC-Unique: BtULbbmKP6yELXGvoRUZSQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 1/7] libvirt-stream: Don't require RPC module Date: Wed, 8 Dec 2021 16:29:03 +0100 Message-Id: <91e4c3fe9c39526946c03a38174ef78d85b14d82.1638977134.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.11 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: 1638977582936100001 Content-Type: text/plain; charset="utf-8" When implementing sparse streams, one of improvements I did was to increase client buffer size for sending/receiving stream data (commit v1.3.5-rc1~502). Previously, we were using 64KiB buffer while packets on RPC are 256KiB (usable data is slightly less because of the header). This meant that it took multiple calls of virStreamRecv()/virStreamSend() to serve a single packet of data. In my fix, I've included the virnetprotocol.h file which provides VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX macro which is the exact size of data in a single packet. However, including the file from libvirt-stream.c which implements public APIs is not right. If RPC module is not built then the file doesn't exists. Redefine the macro and drop the include. The size can never change anyways. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/libvirt-stream.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libvirt-stream.c b/src/libvirt-stream.c index 873d7b1d4e..86b13f39de 100644 --- a/src/libvirt-stream.c +++ b/src/libvirt-stream.c @@ -23,12 +23,16 @@ #include "datatypes.h" #include "viralloc.h" #include "virlog.h" -#include "rpc/virnetprotocol.h" =20 VIR_LOG_INIT("libvirt.stream"); =20 #define VIR_FROM_THIS VIR_FROM_STREAMS =20 +/* To avoid dragging in RPC code (which may be not compiled in), + * redefine this constant. Its value can't ever change, so we're + * safe to do so. */ +#define VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX 262120 + =20 /** * virStreamNew: --=20 2.32.0 From nobody Wed May 8 02:38:33 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=1638977453; cv=none; d=zohomail.com; s=zohoarc; b=Mh2YQz31G00Yx51ge7SKn1Q9mq7hDFk9qpsQCvhnpi70nM4iDLPfLGd74QG+wZRTpCT/GZiwYTojPs8PSNLnQ6iZfYhVSHh+3B5QLtx2RtColkDEpwdGaQlkKXUChFbfcXSXOK5kx2b+CzlY8ILLXED/9eTLuAyIWjORCUujhGg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638977453; 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=K7s8ESsC8mtq6ZNygKaTM7BLT2/y3c2/ejPxc8ZKuPo=; b=O/mUyB6KsheirILKPn2CdNruuttdGMwNANMPLhYXwFYkGQHA/HY3j58Mj9K/fvHv/EJgSbUJebYyAvcby0IJKGhy5KosdVDwK+3ipNJlFMmANhzyyjeXI2FcpapbuJjEsY7J6A+31B80tM6JY2FDPpuvWyQ32sBHIILRZEPpn4M= 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 1638977453433153.1470925880776; Wed, 8 Dec 2021 07:30:53 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-234-voyfq9CAN-ePhgxgoyKLyg-1; Wed, 08 Dec 2021 10:30:49 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F1D0190B2A6; Wed, 8 Dec 2021 15:30:43 +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 4C7005D6D5; Wed, 8 Dec 2021 15:30:43 +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 1BECB1809CB8; Wed, 8 Dec 2021 15:30:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B8FTVGH032083 for ; Wed, 8 Dec 2021 10:29:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 84D31794DC; Wed, 8 Dec 2021 15:29:31 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B619794DB for ; Wed, 8 Dec 2021 15:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638977452; 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=K7s8ESsC8mtq6ZNygKaTM7BLT2/y3c2/ejPxc8ZKuPo=; b=WlFDVn268GbZbs9R5m9FTi2dzmKKh3m2a9pk97DrV7xdQzWa4jSbHjU8Y14MlBo1WpyZHG jZw3/YGgqF3HwLeim2ISUrLV+QPwpAC2H/8cx8vYbrweVKr/0DFBQnyoa8M35sG9ZfZAp3 jmQq7Vz7G7NhqgQX9LD5TBUCqgDnffg= X-MC-Unique: voyfq9CAN-ePhgxgoyKLyg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 2/7] rpc: Separate out socket code into another static lib Date: Wed, 8 Dec 2021 16:29:04 +0100 Message-Id: <123a23cee062f87424e759d4ad4b10b614e238cc.1638977134.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.15 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: 1638977454012100001 Content-Type: text/plain; charset="utf-8" There's nothing RPC specific about virnettlscontext.c or virnetsocket.c. We use TLS for other things than just RPC encryption (e.g. for generating random numbers) and sockets can be used even without RPC. Move these two sources into a static library (virt_socket) so that other areas can use it even when RPC is disabled. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/libvirt_remote.syms | 56 ----------------------------------- src/libvirt_socket.syms | 65 +++++++++++++++++++++++++++++++++++++++++ src/rpc/meson.build | 24 +++++++++++++-- 3 files changed, 87 insertions(+), 58 deletions(-) create mode 100644 src/libvirt_socket.syms diff --git a/src/libvirt_remote.syms b/src/libvirt_remote.syms index 942e1013a6..1089796066 100644 --- a/src/libvirt_remote.syms +++ b/src/libvirt_remote.syms @@ -225,62 +225,6 @@ virNetServerServiceTimerActive; virNetServerServiceToggle; =20 =20 -# rpc/virnetsocket.h -virNetSocketAccept; -virNetSocketAddIOCallback; -virNetSocketCheckProtocols; -virNetSocketClose; -virNetSocketDupFD; -virNetSocketGetFD; -virNetSocketGetPath; -virNetSocketGetPort; -virNetSocketGetSELinuxContext; -virNetSocketGetUNIXIdentity; -virNetSocketHasCachedData; -virNetSocketHasPassFD; -virNetSocketHasPendingData; -virNetSocketIsLocal; -virNetSocketListen; -virNetSocketLocalAddrStringSASL; -virNetSocketNewConnectCommand; -virNetSocketNewConnectExternal; -virNetSocketNewConnectLibSSH2; -virNetSocketNewConnectSockFD; -virNetSocketNewConnectSSH; -virNetSocketNewConnectTCP; -virNetSocketNewConnectUNIX; -virNetSocketNewListenFD; -virNetSocketNewListenTCP; -virNetSocketNewListenUNIX; -virNetSocketNewPostExecRestart; -virNetSocketPreExecRestart; -virNetSocketRead; -virNetSocketRecvFD; -virNetSocketRemoteAddrStringSASL; -virNetSocketRemoteAddrStringURI; -virNetSocketRemoveIOCallback; -virNetSocketSendFD; -virNetSocketSetBlocking; -virNetSocketSetTLSSession; -virNetSocketUpdateIOCallback; -virNetSocketWrite; - - -# rpc/virnettlscontext.h -virNetTLSContextCheckCertificate; -virNetTLSContextNewClient; -virNetTLSContextNewClientPath; -virNetTLSContextNewServer; -virNetTLSContextNewServerPath; -virNetTLSInit; -virNetTLSSessionGetHandshakeStatus; -virNetTLSSessionGetKeySize; -virNetTLSSessionGetX509DName; -virNetTLSSessionHandshake; -virNetTLSSessionNew; -virNetTLSSessionRead; -virNetTLSSessionSetIOCallbacks; -virNetTLSSessionWrite; =20 =20 # Let emacs know we want case-insensitive sorting diff --git a/src/libvirt_socket.syms b/src/libvirt_socket.syms new file mode 100644 index 0000000000..3669166225 --- /dev/null +++ b/src/libvirt_socket.syms @@ -0,0 +1,65 @@ +# +# TLS and socket specific symbols +# + +# rpc/virnetsocket.h +virNetSocketAccept; +virNetSocketAddIOCallback; +virNetSocketCheckProtocols; +virNetSocketClose; +virNetSocketDupFD; +virNetSocketGetFD; +virNetSocketGetPath; +virNetSocketGetPort; +virNetSocketGetSELinuxContext; +virNetSocketGetUNIXIdentity; +virNetSocketHasCachedData; +virNetSocketHasPassFD; +virNetSocketHasPendingData; +virNetSocketIsLocal; +virNetSocketListen; +virNetSocketLocalAddrStringSASL; +virNetSocketNewConnectCommand; +virNetSocketNewConnectExternal; +virNetSocketNewConnectLibSSH2; +virNetSocketNewConnectSockFD; +virNetSocketNewConnectSSH; +virNetSocketNewConnectTCP; +virNetSocketNewConnectUNIX; +virNetSocketNewListenFD; +virNetSocketNewListenTCP; +virNetSocketNewListenUNIX; +virNetSocketNewPostExecRestart; +virNetSocketPreExecRestart; +virNetSocketRead; +virNetSocketRecvFD; +virNetSocketRemoteAddrStringSASL; +virNetSocketRemoteAddrStringURI; +virNetSocketRemoveIOCallback; +virNetSocketSendFD; +virNetSocketSetBlocking; +virNetSocketSetTLSSession; +virNetSocketUpdateIOCallback; +virNetSocketWrite; + + +# rpc/virnettlscontext.h +virNetTLSContextCheckCertificate; +virNetTLSContextNewClient; +virNetTLSContextNewClientPath; +virNetTLSContextNewServer; +virNetTLSContextNewServerPath; +virNetTLSInit; +virNetTLSSessionGetHandshakeStatus; +virNetTLSSessionGetKeySize; +virNetTLSSessionGetX509DName; +virNetTLSSessionHandshake; +virNetTLSSessionNew; +virNetTLSSessionRead; +virNetTLSSessionSetIOCallbacks; +virNetTLSSessionWrite; + +# Let emacs know we want case-insensitive sorting +# Local Variables: +# sort-fold-case: t +# End: diff --git a/src/rpc/meson.build b/src/rpc/meson.build index cc1424140a..6c32610d29 100644 --- a/src/rpc/meson.build +++ b/src/rpc/meson.build @@ -1,10 +1,30 @@ genprotocol_prog =3D find_program('genprotocol.pl') gendispatch_prog =3D find_program('gendispatch.pl') =20 -rpc_sources =3D [ - 'virnetmessage.c', +socket_sources =3D [ 'virnettlscontext.c', 'virnetsocket.c', +] + +virt_socket_lib =3D static_library( + 'virt_socket', + [ + socket_sources, + ], + dependencies: [ + gnutls_dep, + src_dep, + ], +) + +libvirt_libs +=3D [ + virt_socket_lib +] + +used_sym_files +=3D 'libvirt_socket.syms' + +rpc_sources =3D [ + 'virnetmessage.c', 'virkeepalive.c', ] =20 --=20 2.32.0 From nobody Wed May 8 02:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1638977436; cv=none; d=zohomail.com; s=zohoarc; b=ddQs/e5mMlKf4AfGP7nI83Ws7DpKdI9l41Qo0zg58UH2Thwg7O18T1ZrN632lbyJIIFKfKHt3l+0iuKyKzb+PRT9X/N7gSwQkm4goTT/KddIZcdLafvz+TDTjKMsI+j0dhQ/THWr7Pa/3ps8WD5AETfmeDUCr26UpklJCznYTaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638977436; 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=WJtk0JLNHnF+ZEZoI3k/b6q0Iye8sy6EPr12sO8fXio=; b=Wg84ibXRfH1U+yrF9YAD5iy028BWCEykDl5l7tFEE0qlhjzd/dNmrRGlkkSPp9ow0C5qxRAHekwbSppttEFuI2eOIsNjT/xDezlT0NYPX8Snsur5yiSaNFoIcJV0HtO2ZB4M0VruGmfSXRxnHHiddkoWnix7+twPX8yHiCkVdzY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1638977436024203.75154099099586; Wed, 8 Dec 2021 07:30:36 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-353-E3z3vPAqM0-tocoYVBSZgA-1; Wed, 08 Dec 2021 10:30:30 -0500 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 6274118C8C01; Wed, 8 Dec 2021 15:30:25 +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 40D2B5C1C5; Wed, 8 Dec 2021 15:30:24 +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 D60ED1809CB9; Wed, 8 Dec 2021 15:30:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B8FTW2d032095 for ; Wed, 8 Dec 2021 10:29:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 56ECF794DC; Wed, 8 Dec 2021 15:29:32 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2110794DB for ; Wed, 8 Dec 2021 15:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638977434; 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=WJtk0JLNHnF+ZEZoI3k/b6q0Iye8sy6EPr12sO8fXio=; b=OENDTzKgOElFwPFmwVo5rCVIe9LE10vr5nIIJsqNnep/K3QSAA99/fHIb4JKmS6XA2uJlm a2h0rJkqu0r3Lh2AdXnRnVKj61or7ir4QfNdabI9xatq9ckxSHLDvYsSKQB4H0XTZs4E8M nj6h3D9EcIDF1+P/vufBELrBjmbFKgA= X-MC-Unique: E3z3vPAqM0-tocoYVBSZgA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 3/7] rpc: Build only when XDR is available Date: Wed, 8 Dec 2021 16:29:05 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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: 1638977436738100001 Content-Type: text/plain; charset="utf-8" Our RPC layer is as tied to XDR as possible. Therefore, if we haven't detected and XDR library there's not much sense in trying to build RPC layer. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/rpc/meson.build | 112 ++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 55 deletions(-) diff --git a/src/rpc/meson.build b/src/rpc/meson.build index 6c32610d29..7fde92e6cf 100644 --- a/src/rpc/meson.build +++ b/src/rpc/meson.build @@ -83,59 +83,67 @@ rpc_client_sources =3D [ 'virnetclient.c', ] =20 -virt_rpc_lib =3D static_library( - 'virt_net_rpc', - [ - rpc_sources, - rpc_gen_headers, - rpc_gen_sources, - ], - dependencies: [ - gnutls_dep, - libssh2_dep, - libssh_dep, - sasl_dep, - secdriver_dep, - src_dep, - xdr_dep, - ], -) +if conf.has('WITH_REMOTE') + virt_rpc_lib =3D static_library( + 'virt_net_rpc', + [ + rpc_sources, + rpc_gen_headers, + rpc_gen_sources, + ], + dependencies: [ + gnutls_dep, + libssh2_dep, + libssh_dep, + sasl_dep, + secdriver_dep, + src_dep, + xdr_dep, + ], + ) =20 -check_protocols +=3D { - 'name': 'virnetprotocol', - 'lib': virt_rpc_lib, -} + check_protocols +=3D { + 'name': 'virnetprotocol', + 'lib': virt_rpc_lib, + } =20 -check_protocols +=3D { - 'name': 'virkeepaliveprotocol', - 'lib': virt_rpc_lib, -} + check_protocols +=3D { + 'name': 'virkeepaliveprotocol', + 'lib': virt_rpc_lib, + } =20 -virt_rpc_server_lib =3D static_library( - 'virt_net_rpc_server', - [ - rpc_server_sources, - rpc_gen_headers, - ], - dependencies: [ - sasl_dep, - src_dep, - xdr_dep, - ], -) + virt_rpc_server_lib =3D static_library( + 'virt_net_rpc_server', + [ + rpc_server_sources, + rpc_gen_headers, + ], + dependencies: [ + sasl_dep, + src_dep, + xdr_dep, + ], + ) =20 -virt_rpc_client_lib =3D static_library( - 'virt_net_rpc_client', - [ - rpc_client_sources, - rpc_gen_headers, - ], - dependencies: [ - sasl_dep, - src_dep, - xdr_dep, - ], -) + virt_rpc_client_lib =3D static_library( + 'virt_net_rpc_client', + [ + rpc_client_sources, + rpc_gen_headers, + ], + dependencies: [ + sasl_dep, + src_dep, + xdr_dep, + ], + ) + + libvirt_libs +=3D [ + virt_rpc_lib, + virt_rpc_client_lib, + virt_rpc_server_lib, + ] +endif =20 rpc_inc_dir =3D include_directories('.') =20 @@ -143,9 +151,3 @@ rpc_dep =3D declare_dependency( include_directories: [ rpc_inc_dir ], sources: [ rpc_gen_headers ], ) - -libvirt_libs +=3D [ - virt_rpc_lib, - virt_rpc_client_lib, - virt_rpc_server_lib, -] --=20 2.32.0 From nobody Wed May 8 02:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1638977458; cv=none; d=zohomail.com; s=zohoarc; b=bi/lR2mgd3hfL8mtAXIxsNT6YdHIVQaryL3y2K3lWCsPZCcybUaVqzmkF013r9633Qo5xTqsssJJV5qB/7r3Hxnc45iO6Euv0BEOmcmYpsJW5Wnjh0/NRA+0qTArhPtcgb7UrVQGncvitiDaKfVNAtwVY4JBcodO6J8u+0oNhUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638977458; 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=mVnJEpI7+ofgj5ynVdAU0cmzD2uJMM/bh2rMImFaovU=; b=liyV4N4ksOya6fVUxNsy8bd4cjOufAmE49AgLl0x2OZ9e6PeVtI+3sYE1QegwM7bhwSKNyHu3aEzeqNuyT5PvqWdEQJLGw+lZPgDKtlevg4WR4ukufsoHAhFigD//KTa/KFAvRuundczpvWOcg3H+2hGAfrzL/I9V2IoTMyfShc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1638977458348178.64339356805453; Wed, 8 Dec 2021 07:30:58 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-589-kkfxBXfkOHuhgyjnXHu9VA-1; Wed, 08 Dec 2021 10:30:55 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BB0E801B0F; Wed, 8 Dec 2021 15:30:48 +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 4013145D71; Wed, 8 Dec 2021 15:30:48 +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 CC5374BB7C; Wed, 8 Dec 2021 15:30:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B8FTiqT032115 for ; Wed, 8 Dec 2021 10:29:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id E1174794D7; Wed, 8 Dec 2021 15:29:44 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6915E794DD for ; Wed, 8 Dec 2021 15:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638977457; 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=mVnJEpI7+ofgj5ynVdAU0cmzD2uJMM/bh2rMImFaovU=; b=YTlUPfc/HDXRTgbh2s/WqflX1QQsUDCz2z2D9bzAwSZazpygcIlZ8ohqTPbl8bx9gzXRXW v4mucMbRXzUpKp3MvYtar/88I6V/GkebuXugwaDXDB7NWDQuEuHqOtr1pCoUWFlUOJdZsz 2NLaZbpEGJwdF8ou1VdFm2fa1cKJAcQ= X-MC-Unique: kkfxBXfkOHuhgyjnXHu9VA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 4/7] logging: Build log manager only when RPC is available Date: Wed, 8 Dec 2021 16:29:06 +0100 Message-Id: <00ae0f9b0e47e32a11da4e6eda698a29d6d0a847.1638977134.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.11 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: 1638977459957100001 Content-Type: text/plain; charset="utf-8" The logging manager is very closely tied to RPC. If we are building without RPC support there's not much use for the manager, in fact it fails to build. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/libvirt_logging.syms | 18 ++++++++++++++++++ src/libvirt_private.syms | 9 --------- src/logging/meson.build | 31 ++++++++++++++++++------------- 3 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 src/libvirt_logging.syms diff --git a/src/libvirt_logging.syms b/src/libvirt_logging.syms new file mode 100644 index 0000000000..e2a1a7109f --- /dev/null +++ b/src/libvirt_logging.syms @@ -0,0 +1,18 @@ +# +# Domain logging specific symbols +# + + +# logging/log_manager.h +virLogManagerDomainAppendMessage; +virLogManagerDomainGetLogFilePosition; +virLogManagerDomainOpenLogFile; +virLogManagerDomainReadLogFile; +virLogManagerFree; +virLogManagerNew; + + +# Let emacs know we want case-insensitive sorting +# Local Variables: +# sort-fold-case: t +# End: diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7be5b51100..9900bfbe27 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1666,15 +1666,6 @@ virLockManagerPluginUsesState; virLockManagerRelease; =20 =20 -# logging/log_manager.h -virLogManagerDomainAppendMessage; -virLogManagerDomainGetLogFilePosition; -virLogManagerDomainOpenLogFile; -virLogManagerDomainReadLogFile; -virLogManagerFree; -virLogManagerNew; - - # security/security_driver.h virSecurityDriverLookup; =20 diff --git a/src/logging/meson.build b/src/logging/meson.build index 996d4265fc..89e06a0d5a 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -32,20 +32,25 @@ log_daemon_sources =3D files( 'log_handler.c', ) =20 -log_driver_lib =3D static_library( - 'virt_log_driver', - [ - log_driver_sources, - log_protocol_generated, - ], - dependencies: [ - rpc_dep, - src_dep, - xdr_dep, - ], -) +if conf.has('WITH_REMOTE') + log_driver_lib =3D static_library( + 'virt_log_driver', + [ + log_driver_sources, + log_protocol_generated, + ], + dependencies: [ + rpc_dep, + src_dep, + xdr_dep, + ], + ) =20 -libvirt_libs +=3D log_driver_lib + libvirt_libs +=3D log_driver_lib + used_sym_files +=3D 'libvirt_logging.syms' +else + sym_files +=3D 'libvirt_logging.syms' +endif =20 if conf.has('WITH_LIBVIRTD') log_daemon_generated =3D custom_target( --=20 2.32.0 From nobody Wed May 8 02:38:33 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=1638977463; cv=none; d=zohomail.com; s=zohoarc; b=Fut/VSACYNOtkpqm4Bu5hySVXoVsmoIg5M/X59YrPffJlv826J83k4lZXARpu8F+jN0uXoHAMbt6tUA96V3oGKG8EcKy8zdCeRD3s9OFnZj7SeOTLA360YwMuLz3k2NMceIt5R6hXymuGnb6mAnYqC8dxnuW+spoMBloY+XcJE0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638977463; 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=frrTMxkC0ccyngitJLzLrE0J0ANxbXvXVGz8EbZKFLs=; b=Hu05KDaujRy2nftKU39C+iBR1+KSMEoMwOYbjFrnvpFMzBea4QoFWIsIZNWx2idG+MW5PfKjdI7RE64lSfK0l13sJu+yYiSxRkEos+LqVURMaoGh8SGc5dsA/EnW/dUWMiTkWziyeSHiYQ8dS7+eviqrS3unONpGqmmPhAiLj8A= 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 1638977463724200.9640178333383; Wed, 8 Dec 2021 07:31:03 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-210-h9JPdj_JOziCBsGLSzmPgw-1; Wed, 08 Dec 2021 10:31:00 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B2F41835E4E; Wed, 8 Dec 2021 15:30:54 +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 9300F45D71; Wed, 8 Dec 2021 15:30:54 +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 63EB11809CB9; Wed, 8 Dec 2021 15:30:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B8FU9Nc032173 for ; Wed, 8 Dec 2021 10:30:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id 64EEA794D6; Wed, 8 Dec 2021 15:30:09 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id E065F7958B for ; Wed, 8 Dec 2021 15:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638977462; 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=frrTMxkC0ccyngitJLzLrE0J0ANxbXvXVGz8EbZKFLs=; b=P5lPU6w3RMNlmtu4mx2baxMQ2YRIcaqR1xpgOkKAXgoNXOZkAcwOSTGlUWcgAQs1OGkuI0 f0TaZZcJUsHMjXhkRZ0Ia61RJzU7HPRZZtjNx7PneORruBmd2V1qGaXGIbLt33ZXNFiUaz xckPWbov09BzoGTZaZHI+QIzyT06BiM= X-MC-Unique: h9JPdj_JOziCBsGLSzmPgw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 5/7] admin: Build only when RPC is available Date: Wed, 8 Dec 2021 16:29:07 +0100 Message-Id: <45aa04c91da22ed07a53a32828d439f00d44ca23.1638977134.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.11 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: 1638977465571100003 Content-Type: text/plain; charset="utf-8" The admin module is very closely tied to RPC. If we are building without RPC support there's not much use for the admin module, in fact it fails to build. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- examples/c/admin/meson.build | 36 ++++++------- src/admin/meson.build | 36 ++++++------- src/meson.build | 98 ++++++++++++++++++------------------ tools/meson.build | 44 ++++++++-------- 4 files changed, 111 insertions(+), 103 deletions(-) diff --git a/examples/c/admin/meson.build b/examples/c/admin/meson.build index 094408a63c..aa7811ebe5 100644 --- a/examples/c/admin/meson.build +++ b/examples/c/admin/meson.build @@ -8,20 +8,22 @@ example_admin_files =3D [ 'threadpool_params', ] =20 -foreach name : example_admin_files - source_file =3D '@0@.c'.format(name) - executable( - name, - [ - source_file, - ], - include_directories: [ - libvirt_inc, - ], - link_with: [ - libvirt_lib, - libvirt_admin_lib, - ], - ) - install_data(source_file, install_dir: example_dir / 'c' / 'admin') -endforeach +if conf.has('WITH_REMOTE') + foreach name : example_admin_files + source_file =3D '@0@.c'.format(name) + executable( + name, + [ + source_file, + ], + include_directories: [ + libvirt_inc, + ], + link_with: [ + libvirt_lib, + libvirt_admin_lib, + ], + ) + install_data(source_file, install_dir: example_dir / 'c' / 'admin') + endforeach +endif diff --git a/src/admin/meson.build b/src/admin/meson.build index f787c6665b..130997fb87 100644 --- a/src/admin/meson.build +++ b/src/admin/meson.build @@ -91,24 +91,26 @@ libvirt_admin_syms_flags =3D '@0@@1@'.format( libvirt_admin_syms_file.full_path(), ) =20 -admin_driver_lib =3D static_library( - 'virt_admin_driver', - [ - admin_driver_sources, - admin_driver_generated, - ], - dependencies: [ - rpc_dep, - sasl_dep, - src_dep, - xdr_dep, - ], -) +if conf.has('WITH_REMOTE') + admin_driver_lib =3D static_library( + 'virt_admin_driver', + [ + admin_driver_sources, + admin_driver_generated, + ], + dependencies: [ + rpc_dep, + sasl_dep, + src_dep, + xdr_dep, + ], + ) =20 -check_protocols +=3D { - 'name': 'admin_protocol', - 'lib': admin_driver_lib, -} + check_protocols +=3D { + 'name': 'admin_protocol', + 'lib': admin_driver_lib, + } +endif =20 virt_conf_files +=3D files('libvirt-admin.conf') =20 diff --git a/src/meson.build b/src/meson.build index 2bd88e6699..2408344ef7 100644 --- a/src/meson.build +++ b/src/meson.build @@ -517,48 +517,48 @@ libvirt_lxc_lib =3D shared_library( =20 =20 # libvirt-admin.so - -libvirt_admin_lib =3D shared_library( - 'virt-admin', - [ - admin_sources, - admin_client_generated, - admin_driver_generated, - datatypes_sources, - dtrace_gen_objects, - ], - dependencies: [ - capng_dep, - devmapper_dep, - gnutls_dep, - libssh2_dep, - libssh_dep, - sasl_dep, - src_dep, - rpc_dep, - xdr_dep, - yajl_dep, - ], - include_directories: [ - admin_inc_dir, - remote_inc_dir, - ], - link_args: [ - libvirt_admin_syms_flags, - libvirt_nodelete, - ], - link_with: [ - libvirt_lib, - ], - link_depends: [ - libvirt_admin_syms_file, - ], - install: true, - install_rpath: libvirt_rpath, - version: libvirt_lib_version, - soversion: libvirt_so_version, -) - +if conf.has('WITH_REMOTE') + libvirt_admin_lib =3D shared_library( + 'virt-admin', + [ + admin_sources, + admin_client_generated, + admin_driver_generated, + datatypes_sources, + dtrace_gen_objects, + ], + dependencies: [ + capng_dep, + devmapper_dep, + gnutls_dep, + libssh2_dep, + libssh_dep, + sasl_dep, + src_dep, + rpc_dep, + xdr_dep, + yajl_dep, + ], + include_directories: [ + admin_inc_dir, + remote_inc_dir, + ], + link_args: [ + libvirt_admin_syms_flags, + libvirt_nodelete, + ], + link_with: [ + libvirt_lib, + ], + link_depends: [ + libvirt_admin_syms_file, + ], + install: true, + install_rpath: libvirt_rpath, + version: libvirt_lib_version, + soversion: libvirt_so_version, + ) +endif =20 # build libvirt shared modules =20 @@ -919,12 +919,14 @@ if host_machine.system() =3D=3D 'linux' env: runutf8, ) =20 - test( - 'check-admin-symfile', - python3_prog, - args: [ check_symfile_prog.path(), libvirt_admin_syms, libvirt_admin_l= ib ], - env: runutf8, - ) + if conf.has('WITH_REMOTE') + test( + 'check-admin-symfile', + python3_prog, + args: [ check_symfile_prog.path(), libvirt_admin_syms, libvirt_admin= _lib ], + env: runutf8, + ) + endif endif =20 test( diff --git a/tools/meson.build b/tools/meson.build index 3fba313e5f..22fa3604ba 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -206,27 +206,29 @@ executable( install_rpath: libvirt_rpath, ) =20 -executable( - 'virt-admin', - [ - 'virt-admin.c', - 'virt-admin-completer.c', - ], - dependencies: [ - tools_dep, - readline_dep, - ], - link_args: [ - coverage_flags, - ], - link_with: [ - libvirt_admin_lib, - libvirt_shell_lib, - ], - install: true, - install_dir: bindir, - install_rpath: libvirt_rpath, -) +if conf.has('WITH_REMOTE') + executable( + 'virt-admin', + [ + 'virt-admin.c', + 'virt-admin-completer.c', + ], + dependencies: [ + tools_dep, + readline_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_admin_lib, + libvirt_shell_lib, + ], + install: true, + install_dir: bindir, + install_rpath: libvirt_rpath, + ) +endif =20 tools_conf =3D configuration_data() tools_conf.set('PACKAGE', meson.project_name()) --=20 2.32.0 From nobody Wed May 8 02:38:33 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=1638977438; cv=none; d=zohomail.com; s=zohoarc; b=kGbSFlrvDZJy1HJFt6Sn+DHuufF3Z1R4s7xjrnPbY9LqPxzMVdTgsywO05xB8CH+we1rrBUXUno0Ax1d+7A9LFmSpv6Tk1qeup2ZrtxTY3HfhkXtH6cOwiAiwT+sAEJBDgtgbKF3XTIZ1r0yqJ2teK0OxyfX0IJrWaA8eK4UbqU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638977438; 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=x+KQY+WL5ga0STI2sBV8UFOw06vvbsq/vEdXMIInDNo=; b=bAzEDkUEfZJ5excGwoiBWWmCdZjmZX5YlNXDf81JR1OEhHtcUS5ClaciARVcnJ3hgVOelpWwr/Dssz/1aKVBes4U9QyIsrYmqfptYWLiH7C35TSy8pWX5GVUYTJGH++fjQ+4B5egOEKCDqJjkxEJbf4CcZS3VW49osQD602PzTE= 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 1638977438733543.6595965671285; Wed, 8 Dec 2021 07:30:38 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-530-Hcly8yifMZuIgFnCZyJ5uA-1; Wed, 08 Dec 2021 10:30:35 -0500 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 3C61D101D608; Wed, 8 Dec 2021 15:30:30 +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 1500960BF1; Wed, 8 Dec 2021 15:30: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 DA5991809CB9; Wed, 8 Dec 2021 15:30:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B8FUAGq032183 for ; Wed, 8 Dec 2021 10:30:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 36EAC794D7; Wed, 8 Dec 2021 15:30:10 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2583794D6 for ; Wed, 8 Dec 2021 15:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638977437; 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=x+KQY+WL5ga0STI2sBV8UFOw06vvbsq/vEdXMIInDNo=; b=bg7IItWIj2sLhixLy0osyIuUG+sS5aniqfSgw+Q+XJdbAeeNtSDVCTL93O/s64IHAUuEhM xFUdvUyHB3apwlNgHIasMm5Ni7Cho7JiauA4Ys1dzBb696CHbowRcd1V7nISY20Iu7/Os4 x/9FqBJ1KZTG/gfyTWwB9TaAUCKcZVI= X-MC-Unique: Hcly8yifMZuIgFnCZyJ5uA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 6/7] meson: Require XDR for wireshark Date: Wed, 8 Dec 2021 16:29:08 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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: 1638977439586100001 Content-Type: text/plain; charset="utf-8" The way our wireshark dissector works is by providing decoders for primitive types (like integers, string, double, etc.) and then parsing virsomethingprotocol.x files and generating complex decoders for RPC. This obviously means that XDR is required for the dissector, but corresponding check was missing. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meson.build b/meson.build index cea8bbfa0c..c5f0ee7287 100644 --- a/meson.build +++ b/meson.build @@ -1310,6 +1310,16 @@ endif =20 wireshark_version =3D '2.6.0' wireshark_dep =3D dependency('wireshark', version: '>=3D' + wireshark_vers= ion, required: get_option('wireshark_dissector')) +if wireshark_dep.found() + if not xdr_dep.found() + if get_option('wireshark_dissector').enabled() + error('XDR is required for wireshark plugin') + else + wireshark_dep =3D dependency('', required: false) + endif + endif +endif + if wireshark_dep.found() wireshark_plugindir =3D get_option('wireshark_plugindir') if wireshark_plugindir =3D=3D '' --=20 2.32.0 From nobody Wed May 8 02:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1638977588; cv=none; d=zohomail.com; s=zohoarc; b=mG7/K9k+f90JgIRIxqhQ+22IJ+pMs3p/RYtIEIJNZtqJATklGC/tIJQQ7+Wk7he8mHhDP5ncuuLbHx4QoMerUA/6pH9khiSTn1faK5EZC65OVvHncXb3aT7Rr+7+1rqB/OCpIO+PNQUDZ1tG5325ch4WroIP6OhPeoxMAOFZA28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638977588; 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=Pz0UmZc7MmSXXD/1vAQwLKfrNAD4DE10tacYXD2MVbA=; b=Ek1T/L0AgMMnP9EERkiLqOF40AvLvatyJHcEB6EICb+dbPLupAL/DaK4RHnqVUCOT42mpGv3FuDXdXkFsv0a2BGkYHYVACOBZrgny7Qc/LfmyGlA0SKSDQJ8VHgX8Z5/ngWxV+5WE8hk7MQH1iTsvBb4BOOEHLB3tkCs5Vsf4Lk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1638977588816113.025762239492; Wed, 8 Dec 2021 07:33:08 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-559-FwazJmWgPaiATPw_n22_vQ-1; Wed, 08 Dec 2021 10:33:06 -0500 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 8BB68108087A; Wed, 8 Dec 2021 15:33:00 +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 672D1610F3; Wed, 8 Dec 2021 15:33:00 +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 32D491809CB8; Wed, 8 Dec 2021 15:33:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B8FUBAE032188 for ; Wed, 8 Dec 2021 10:30:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0AAE7794D7; Wed, 8 Dec 2021 15:30:11 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84B14794D6 for ; Wed, 8 Dec 2021 15:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638977587; 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=Pz0UmZc7MmSXXD/1vAQwLKfrNAD4DE10tacYXD2MVbA=; b=Gxjph7pu5LdSgYHXCBS+dYZMcnYKT49hhxsfRU2F4reyCQQayDkrbwG4DZkjC7F7UZdoNk U6xsgQ8JJLVdDTkaOqGoOIywUK9AOeRiPiL/ormKP9cVormEXgBZ1ot/vl13H2f5kXxXOf CyHGTSjMcaccQowpbWNlWiHia97NJ78= X-MC-Unique: FwazJmWgPaiATPw_n22_vQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 7/7] meson: Detect XDR only when needed Date: Wed, 8 Dec 2021 16:29:09 +0100 Message-Id: <99b7e80be51ef458909ea98c068a77bc8a0e513c.1638977134.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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: 1638977589455100001 Content-Type: text/plain; charset="utf-8" If remote driver was disabled there is no need to check whether host has a XDR library installed. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/196 Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- meson.build | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index c5f0ee7287..624f37819f 100644 --- a/meson.build +++ b/meson.build @@ -883,32 +883,27 @@ endforeach =20 # early checks where lot of other packages depend on the result =20 -# On MinGW portablexdr provides XDR functions, on linux they are -# provided by libtirpc and on FreeBSD/macOS there is no need to -# use extra library as it's provided by libc directly. -if host_machine.system() =3D=3D 'windows' - xdr_dep =3D cc.find_library('portablexdr', required: false) -elif host_machine.system() =3D=3D 'linux' - xdr_dep =3D dependency('libtirpc', required: false) -elif host_machine.system() in [ 'freebsd', 'darwin' ] - xdr_dep =3D cc.find_library('c', required: false) -else - xdr_dep =3D dependency('', required: false) -endif - if not get_option('driver_remote').disabled() - use_remote =3D true - - if not xdr_dep.found() - use_remote =3D false - if get_option('driver_remote').enabled() - error('XDR is required for remote driver') - endif + # On MinGW portablexdr provides XDR functions, on linux they are + # provided by libtirpc and on FreeBSD/macOS there is no need to + # use extra library as it's provided by libc directly. + if host_machine.system() =3D=3D 'windows' + xdr_dep =3D cc.find_library('portablexdr', required: get_option('drive= r_remote')) + elif host_machine.system() =3D=3D 'linux' + xdr_dep =3D dependency('libtirpc', required: get_option('driver_remote= ')) + elif host_machine.system() in [ 'freebsd', 'darwin' ] + xdr_dep =3D cc.find_library('c', required: get_option('driver_remote')) + else + xdr_dep =3D dependency('', required: false) endif =20 - if use_remote + if xdr_dep.found() conf.set('WITH_REMOTE', 1) + elif get_option('driver_remote').enabled() + error('XDR is required for remote driver') endif +else + xdr_dep =3D dependency('', required: false) endif =20 =20 --=20 2.32.0