From nobody Tue Jan 21 04:20: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=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 173635309381081.79766276015664; Wed, 8 Jan 2025 08:18:13 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id E957A1357; Wed, 8 Jan 2025 11:18:11 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id ECBFD12E5; Wed, 8 Jan 2025 11:17:45 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9B30812CB; Wed, 8 Jan 2025 11:17:43 -0500 (EST) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (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 9DEFC1276 for ; Wed, 8 Jan 2025 11:17:42 -0500 (EST) Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-71e1158fe3eso10137080a34.1 for ; Wed, 08 Jan 2025 08:17:42 -0800 (PST) Received: from home.. ([2603:8081:c640:1::1005]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2a7d77b506bsm13682837fac.33.2025.01.08.08.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 08:17:40 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,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=gmail.com; s=20230601; t=1736353061; x=1736957861; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uLVmy1SNeeArxjs2gncUOTdJAvvpOu7fJ2l/vYLcnMI=; b=TXVpqj+t4oLK4qTauevkfkkV4ed2GyRPKmHrPlUg4L16hUXTlfYdxOFNaYShKqjAsZ iwpy+rNwgJAb5Da+UVNeLYZJYOakCi4CDJFAqnUgcm560AuNhgiMIoImXT4NbTikc2dv 50QpEGjCIsnrV1VrHd/a9Ncc5Akwq4gBzwVIv+U5rCLJBZxQrmJxV97XTeBGrzLohwj0 QGUbJp3t9ENGl6/xXJwyYO9ra3uoSXw0hYXAag8UgA4oPQzSnEHj+8BsctibmLnh7/M1 UnXrLZzql/wPGOGs4+nbXMtCH58HoPggWujEq9AAV9QOzpSj38uSvmMv15UJ2DoM14ZG hTyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736353061; x=1736957861; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uLVmy1SNeeArxjs2gncUOTdJAvvpOu7fJ2l/vYLcnMI=; b=YWzn3TKcIjZlqgPODr4AkcTuNtDGF/JQyiRxSkwukrQlP3BoGj8G7ypLs6vyXUx4CD oFnY6ua5PuwkqYDXS7fCyX1lHhTI7FxHo+lYtyTx4kk9oXXIDKJXoPGbpINV0nCtLrBL YCMrwjWX/ACVYSij24Hnhzs45lZIFlkEydba5q9VqRA7tgCuGHPpDSRid9RZiX7fvXet OGdI9x8tBK2dMKXGq50xEQc+il5BGEDTa/LsvbiK+kO8nA+/6aO12ISYgFhJjX9pfgk0 w/fliCaoR6vTu5RL9K6+V7s0xx9IxFdFumR/wlnj6j9KaWLdIKOw4q+RsLloGCREX7gS zvEw== X-Gm-Message-State: AOJu0YyVAn00wsjKe65P/GAd4CQrzrRbfKCJ0DIQG58xADp2XcGtqCRX XQbcSXFzI/90Q4j8KLph/0kbPMPepM+ukUIgZujodcyNZJrkbx6fRPkovg== X-Gm-Gg: ASbGncuWqe8JhmI1KIOOl1YPD+8GV5qoPo+Jx7YKescuMhlH/iiTdmeUQK10MHJ6go9 9P7bxth1znSQ750fyjTQvkx6y0cCU0LMzVRUxnrgXNNP2io6EjbI4/M0iUEQQgq4Wf/t+3XVkDo XhnsS7ZZM2OPJxLGb5YD4DoyvoGG2PpeeqYStqkORGNiii2D8wWqaj1tlRMLYWBNfZW5QtUXyGo b2/aOOyKbwBpHfYjQSo4hqBEyGTPxDTeG4szMKi X-Google-Smtp-Source: AGHT+IHdYOWHEuN9TNt9RZVCVtoolhqSwl/oBQ9YEwzk3eRIBE/Xda4hxmvw4Qpd9klng9lINsF3Wg== X-Received: by 2002:a05:6830:6317:b0:71d:ffa2:d34d with SMTP id 46e09a7af769-721e2e5c166mr2138474a34.16.1736353061418; Wed, 08 Jan 2025 08:17:41 -0800 (PST) From: Praveen K Paladugu To: devel@lists.libvirt.org Subject: [PATCH v2] spec: Enable ch driver Date: Wed, 8 Jan 2025 10:17:39 -0600 Message-ID: <20250108161739.4334-1-praveenkpaladugu@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: G4KNPBW2QW746WM5CVYONAUNQP73BNS5 X-Message-ID-Hash: G4KNPBW2QW746WM5CVYONAUNQP73BNS5 X-MailFrom: praveenkpaladugu@gmail.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 CC: liuwe@microsoft.com 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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1736353098455116600 Content-Type: text/plain; charset="utf-8" Enabling building and packaging ch driver in the spec file. Signed-off-by: Praveen K Paladugu Reviewed-by: Daniel P. Berrang=C3=A9 --- libvirt.spec.in | 67 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3d5164b534..eb8b35da76 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -35,6 +35,7 @@ %define with_lxc 0%{!?_without_lxc:1} %define with_libxl 0%{!?_without_libxl:1} %define with_vbox 0%{!?_without_vbox:1} +%define with_ch 0%{!?_without_ch:1} =20 %ifarch %{arches_qemu_kvm} %define with_qemu_kvm %{with_qemu} @@ -317,6 +318,9 @@ Obsoletes: libvirt-daemon-uml <=3D 5.0.0 %if %{with_vbox} Requires: libvirt-daemon-driver-vbox =3D %{version}-%{release} %endif +%if %{with_ch} +Requires: libvirt-daemon-driver-ch =3D %{version}-%{release} +%endif Requires: libvirt-daemon-driver-nwfilter =3D %{version}-%{release} Requires: libvirt-daemon-driver-interface =3D %{version}-%{release} Requires: libvirt-daemon-driver-secret =3D %{version}-%{release} @@ -1026,6 +1030,20 @@ Server side daemon and driver required to manage the= virtualization capabilities of VirtualBox %endif =20 + %if %{with_ch} +%package daemon-driver-ch +Summary: Cloud-Hypervisor driver plugin for libvirtd daemon +Requires: libvirt-daemon-common =3D %{version}-%{release} +Requires: libvirt-daemon-log =3D %{version}-%{release} +Requires: libvirt-libs =3D %{version}-%{release} + +%description daemon-driver-ch +The ch driver plugin for the libvirtd daemon, providing +an implementation of the hypervisor driver APIs by +Cloud-Hypervisor + %endif + + %package client Summary: Client side utilities of the libvirt library Requires: libvirt-libs =3D %{version}-%{release} @@ -1188,9 +1206,15 @@ exit 1 %endif =20 %if %{with_esx} - %define arg_esx -Ddriver_esx=3Denabled -Dcurl=3Denabled + %define arg_esx -Ddriver_esx=3Denabled +%else + %define arg_esx -Ddriver_esx=3Ddisabled +%endif + +%if %{with_esx} || %{with_ch} + %define arg_curl -Dcurl=3Denabled %else - %define arg_esx -Ddriver_esx=3Ddisabled -Dcurl=3Ddisabled + %define arg_curl -Dcurl=3Ddisabled %endif =20 %if %{with_hyperv} @@ -1205,6 +1229,12 @@ exit 1 %define arg_vmware -Ddriver_vmware=3Ddisabled %endif =20 +%if %{with_ch} + %define arg_ch -Ddriver_ch=3Denabled +%else + %define arg_ch -Ddriver_ch=3Ddisabled +%endif + %if %{with_storage_rbd} %define arg_storage_rbd -Dstorage_rbd=3Denabled %else @@ -1335,11 +1365,12 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %= {_specdir}/libvirt.spec) -Ddriver_remote=3Denabled \ -Ddriver_test=3Denabled \ %{?arg_esx} \ + %{?arg_curl} \ %{?arg_hyperv} \ %{?arg_vmware} \ + %{?arg_ch} \ -Ddriver_vz=3Ddisabled \ -Ddriver_bhyve=3Ddisabled \ - -Ddriver_ch=3Ddisabled \ %{?arg_remote_mode} \ -Ddriver_interface=3Denabled \ -Ddriver_network=3Denabled \ @@ -1541,6 +1572,10 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/lib= virtd.libxl rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.a= ug %endif + %if ! %{with_ch} +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_ch.aug +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_ch.aug + %endif =20 # Copied into libvirt-docs subpackage eventually mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs @@ -1940,6 +1975,19 @@ exit 0 %libvirt_systemd_unix_preun virtxend %endif =20 + %if %{with_ch} +%pre daemon-driver-ch +%libvirt_sysconfig_pre virtchd +%libvirt_systemd_unix_pre virtchd + +%posttrans daemon-driver-ch +%libvirt_sysconfig_posttrans virtchd +%libvirt_systemd_unix_posttrans virtchd + +%preun daemon-driver-ch +%libvirt_systemd_unix_preun virtchd + %endif + %pre daemon-config-network %libvirt_systemd_config_pre libvirtd %libvirt_systemd_config_pre virtnetworkd @@ -2405,6 +2453,19 @@ exit 0 %attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper %endif =20 + %if %{with_ch} +%files daemon-driver-ch +%attr(0755, root, root) %{_sbindir}/virtchd +%config(noreplace) %{_sysconfdir}/libvirt/virtchd.conf +%{_datadir}/augeas/lenses/virtchd.aug +%{_datadir}/augeas/lenses/tests/test_virtchd.aug +%{_unitdir}/virtchd-admin.socket +%{_unitdir}/virtchd-ro.socket +%{_unitdir}/virtchd.service +%{_unitdir}/virtchd.socket +%{_libdir}/libvirt/connection-driver/libvirt_driver_ch.so + %endif + %files client %{_mandir}/man1/virsh.1* %{_mandir}/man1/virt-xml-validate.1* --=20 2.47.0