From 79f2e60eb99cda47d8e7dc9666978309f5cc74b9 Mon Sep 17 00:00:00 2001 From: mayunlong Date: Wed, 27 Mar 2024 01:22:31 +0800 Subject: [PATCH 1/3] nodedev: delete mdev mdev is deleted because it has no application scenario. Signed-off-by: mayunlong --- libvirt.spec | 9 +++++++-- nodedev-delete-mdev.patch | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 nodedev-delete-mdev.patch diff --git a/libvirt.spec b/libvirt.spec index 6c20c87..71b2fc5 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -270,7 +270,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 9.10.0 -Release: 1%{?dist} +Release: 2 License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1 URL: https://libvirt.org/ @@ -278,6 +278,7 @@ URL: https://libvirt.org/ %define mainturl stable_updates/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz +Patch0000: nodedev-delete-mdev.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -352,6 +353,7 @@ BuildRequires: libnl3-devel BuildRequires: libselinux-devel BuildRequires: iptables BuildRequires: ebtables +BuildRequires: module-init-tools # For modprobe BuildRequires: kmod BuildRequires: cyrus-sasl-devel @@ -614,7 +616,7 @@ Requires: libvirt-libs = %{version}-%{release} # needed for device enumeration Requires: systemd >= 185 # For managing persistent mediated devices -Requires: mdevctl +# Requires: mdevctl # for modprobe of pci devices Requires: module-init-tools @@ -2559,5 +2561,8 @@ exit 0 %endif %changelog +* Wed Mar 27 2024 mayunlong - 9.10.0-2 +- nodedev: delete mdev + * Thu Feb 29 2024 mayunlong - 9.10.0-1 - Update to 9.10.0 release, Initial package for openEuler. diff --git a/nodedev-delete-mdev.patch b/nodedev-delete-mdev.patch new file mode 100644 index 0000000..7428077 --- /dev/null +++ b/nodedev-delete-mdev.patch @@ -0,0 +1,30 @@ +From b782178492141454fc263040708dffa039e7de2a Mon Sep 17 00:00:00 2001 +From: mayunlong +Date: Wed, 27 Mar 2024 01:08:02 +0800 +Subject: [PATCH] nodedev: delete mdev + +mdev is deleted because it has no application scenario + +Signed-off-by: mayunlong +--- + src/node_device/node_device_driver.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c +index a59cd08..f2c3b36 100644 +--- a/src/node_device/node_device_driver.c ++++ b/src/node_device/node_device_driver.c +@@ -850,6 +850,10 @@ nodeDeviceCreateXMLMdev(virConnectPtr conn, + { + g_autofree char *uuid = NULL; + ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", ++ _("Unsupported device type")); ++ return NULL; ++ + if (!def->parent) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("cannot create a mediated device without a parent")); +-- +2.33.0 + -- Gitee From b06fd98c80f9febab66676308b198ab840500312 Mon Sep 17 00:00:00 2001 From: MaYunlong Date: Wed, 27 Mar 2024 04:38:16 +0800 Subject: [PATCH 2/3] spec: fix some switch in spec. Signed-off-by: mayunlong --- libvirt.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libvirt.spec b/libvirt.spec index 71b2fc5..4f6f040 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -93,15 +93,15 @@ # A few optional bits off by default, we enable later %define with_fuse 0 -%define with_sanlock 0 +%define with_sanlock 1 %define with_numad 0 %define with_nbdkit 0 %define with_nbdkit_config_default 0 -%define with_firewalld_zone 0 +%define with_firewalld_zone 1 %define with_netcf 0 -%define with_libssh2 0 -%define with_wireshark 0 -%define with_libssh 0 +%define with_libssh2 1 +%define with_wireshark 1 +%define with_libssh 1 %define with_dmidecode 0 # Finally set the OS / architecture specific special cases @@ -141,7 +141,7 @@ # fuse is used to provide virtualized /proc for LXC %if %{with_lxc} - %define with_fuse 0%{!?_without_fuse:1} + %define with_fuse 0%{!?_without_fuse:0} %endif # Enable sanlock library for lock management with QEMU @@ -271,7 +271,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 9.10.0 Release: 2 -License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1 +License: LGPLv2+ URL: https://libvirt.org/ %if %(echo %{version} | grep -q "\.0$"; echo $?) == 1 @@ -2563,6 +2563,7 @@ exit 0 %changelog * Wed Mar 27 2024 mayunlong - 9.10.0-2 - nodedev: delete mdev +- spec: fix some switch in spec * Thu Feb 29 2024 mayunlong - 9.10.0-1 - Update to 9.10.0 release, Initial package for openEuler. -- Gitee From eeedca18789e101e215cf385d3e570781a5118bc Mon Sep 17 00:00:00 2001 From: MaYunlong Date: Wed, 27 Mar 2024 08:26:19 +0800 Subject: [PATCH 3/3] spec: isolate the client-qemu using macro Signed-off-by: mayunlong --- libvirt.spec | 15 +++++ ...isolate-the-client-qemu-using-macros.patch | 64 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 meson.build-isolate-the-client-qemu-using-macros.patch diff --git a/libvirt.spec b/libvirt.spec index 4f6f040..607dea1 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -35,6 +35,7 @@ %define with_lxc 0%{!?_without_lxc:0} %define with_libxl 0%{!?_without_libxl:0} %define with_vbox 0%{!?_without_vbox:0} +%define with_client_qemu 0%{!?_without_client_qemu:0} %ifarch %{arches_qemu_kvm} %define with_qemu_kvm %{with_qemu} @@ -279,6 +280,7 @@ URL: https://libvirt.org/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz Patch0000: nodedev-delete-mdev.patch +Patch0001: meson.build-isolate-the-client-qemu-using-macros.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -291,8 +293,10 @@ Requires: libvirt-daemon-driver-lxc = %{version}-%{release} %endif %if %{with_qemu} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} +%if %{with_client_qemu} Requires: libvirt-client-qemu = %{version}-%{release} %endif +%endif # We had UML driver, but we've removed it. Obsoletes: libvirt-daemon-driver-uml <= 5.0.0 Obsoletes: libvirt-daemon-uml <= 5.0.0 @@ -1020,6 +1024,7 @@ Obsoletes: libvirt-bash-completion < 7.3.0 The client binaries needed to access the virtualization capabilities of recent versions of Linux (and other OSes). +%if %{with_client_qemu} %package client-qemu Summary: Additional client side utilities for QEMU Requires: libvirt-libs = %{version}-%{release} @@ -1030,6 +1035,7 @@ Requires: python3-lxml %description client-qemu The additional client binaries are used to interact with some QEMU specific features of libvirt. +%endif %package libs Summary: Client side libraries @@ -1484,6 +1490,12 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug %endif + %if ! %{with_client_qemu} +rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/virt-qemu-qmp-proxy.1* +rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/virt-qemu-sev-validate.1* +rm -rf $RPM_BUILD_ROOT%{_bindir}/virt-qemu-qmp-proxy +rm -rf $RPM_BUILD_ROOT%{_bindir}/virt-qemu-sev-validate + %endif %if ! %{with_qemu} rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu @@ -2363,11 +2375,13 @@ exit 0 %{_datadir}/bash-completion/completions/virsh %if %{with_qemu} +%if %{with_client_qemu} %files client-qemu %{_mandir}/man1/virt-qemu-qmp-proxy.1* %{_mandir}/man1/virt-qemu-sev-validate.1* %{_bindir}/virt-qemu-qmp-proxy %{_bindir}/virt-qemu-sev-validate +%endif %endif %files libs -f %{name}.lang @@ -2564,6 +2578,7 @@ exit 0 * Wed Mar 27 2024 mayunlong - 9.10.0-2 - nodedev: delete mdev - spec: fix some switch in spec +- spec: isolate the client-qemu using macros * Thu Feb 29 2024 mayunlong - 9.10.0-1 - Update to 9.10.0 release, Initial package for openEuler. diff --git a/meson.build-isolate-the-client-qemu-using-macros.patch b/meson.build-isolate-the-client-qemu-using-macros.patch new file mode 100644 index 0000000..7278e77 --- /dev/null +++ b/meson.build-isolate-the-client-qemu-using-macros.patch @@ -0,0 +1,64 @@ +From 00e273149d7584750df88be94ce7f53beea26f6d Mon Sep 17 00:00:00 2001 +From: MaYunlong +Date: Wed, 27 Mar 2024 07:56:14 +0800 +Subject: [PATCH] meson.build: isolate the client-qemu using macros + +--- + docs/manpages/meson.build | 4 ++-- + meson.build | 1 + + tools/meson.build | 4 ++-- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build +index bdc1701..38ee547 100644 +--- a/docs/manpages/meson.build ++++ b/docs/manpages/meson.build +@@ -18,9 +18,9 @@ docs_man_files = [ + { 'name': 'virt-pki-query-dn', 'section': '1', 'install': true }, + { 'name': 'virt-pki-validate', 'section': '1', 'install': true }, + { 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') }, +- { 'name': 'virt-qemu-qmp-proxy', 'section': '1', 'install': conf.has('WITH_QEMU') }, ++ { 'name': 'virt-qemu-qmp-proxy', 'section': '1', 'install': conf.has('WITH_CLIENT_QEMU') }, + { 'name': 'virt-xml-validate', 'section': '1', 'install': true }, +- { 'name': 'virt-qemu-sev-validate', 'section': '1', 'install': conf.has('WITH_QEMU') }, ++ { 'name': 'virt-qemu-sev-validate', 'section': '1', 'install': conf.has('WITH_CLIENT_QEMU') }, + + { 'name': 'libvirt-guests', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') }, + { 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') }, +diff --git a/meson.build b/meson.build +index 611cc58..2a7fa8c 100644 +--- a/meson.build ++++ b/meson.build +@@ -1637,6 +1637,7 @@ if not get_option('driver_qemu').disabled() + if use_qemu + conf.set('WITH_QEMU', 1) + ++ conf.set('WITH_CLIENT_QEMU', 0) + qemu_moddir = get_option('qemu_moddir') + if qemu_moddir == '' + qemu_moddir = libdir / 'qemu' +diff --git a/tools/meson.build b/tools/meson.build +index c72f760..9a5bbd6 100644 +--- a/tools/meson.build ++++ b/tools/meson.build +@@ -301,7 +301,7 @@ if conf.has('WITH_SANLOCK') + ) + endif + +-if conf.has('WITH_QEMU') ++if conf.has('WITH_CLIENT_QEMU') + install_data('virt-qemu-sev-validate', + install_dir: bindir) + endif +@@ -327,7 +327,7 @@ if conf.has('WITH_LIBVIRTD') + endif + endif + +-if conf.has('WITH_QEMU') ++if conf.has('WITH_CLIENT_QEMU') + install_data('virt-qemu-qmp-proxy', + install_dir: bindir) + endif +-- +2.33.0 + -- Gitee