diff --git a/libvirt-9.10.0.tar.xz b/libvirt-9.10.0.tar.xz index 54ff983a9ed69b85fce7a87efd2377dd4d0c18d7..43ccea27c3e7cc0b25984e4c777603b39b916c6a 100644 Binary files a/libvirt-9.10.0.tar.xz and b/libvirt-9.10.0.tar.xz differ diff --git a/libvirt.spec b/libvirt.spec index 6c20c87f1d70fc9b7fe2d2fb3b3011480749ebf0..390b07ea6bed3c65e9611d89515397d8befd8838 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} @@ -93,15 +94,14 @@ # 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 @@ -175,23 +175,15 @@ %endif %endif -# We want to build with nbdkit support, but should only enable nbdkit by -# default if the OS ships a SELinux policy that allows libvirt to launch it. -# Right now that's not the case anywhere, but things should be fine by the time -# Fedora 40 is released. +# We should only enable nbdkit support if the OS ships a SELinux policy that +# allows libvirt to launch it. Right now that's not the case anywhere, but +# things should be fine by the time Fedora 40 is released. +# +# TODO: add RHEL 9 once a minor release that contains the necessary SELinux +# bits exists (we only support the most recent minor release) %if %{with_qemu} - # rhel-8 lacks pidfd_open - %if 0%{?fedora} || 0%{?rhel} >= 9 + %if 0%{?fedora} >= 40 %define with_nbdkit 0%{!?_without_nbdkit:1} - - # setting 'with_nbdkit_config_default' must be done only when compiling - # in nbdkit support - # - # TODO: add RHEL 9 once a minor release that contains the necessary SELinux - # bits exists (we only support the most recent minor release) - %if 0%{?fedora} >= 40 - %define with_nbdkit_config_default 0%{!?_without_nbdkit_config_default:1} - %endif %endif %endif @@ -270,14 +262,16 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 9.10.0 -Release: 1%{?dist} -License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1 +Release: 3 +License: LGPLv2+ URL: https://libvirt.org/ %if %(echo %{version} | grep -q "\.0$"; echo $?) == 1 %define mainturl stable_updates/ %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} @@ -290,8 +284,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 @@ -352,6 +348,7 @@ BuildRequires: libnl3-devel BuildRequires: libselinux-devel BuildRequires: iptables BuildRequires: ebtables +BuildRequires: module-init-tools # For modprobe BuildRequires: kmod BuildRequires: cyrus-sasl-devel @@ -401,6 +398,9 @@ BuildRequires: libssh2-devel >= 1.3.0 %endif %if %{with_netcf} BuildRequires: netcf-devel >= 0.2.2 + %endif + %if 0%{?fedora} || 0%{?rhel} >= 9 +BuildRequires: passt %endif %if %{with_esx} BuildRequires: libcurl-devel @@ -415,6 +415,8 @@ BuildRequires: systemtap-sdt-devel BuildRequires: util-linux # For showmount in FS driver (netfs discovery) BuildRequires: nfs-utils +# For storage wiping with different algorithms +BuildRequires: scrub %if %{with_numad} BuildRequires: numad %endif @@ -436,6 +438,8 @@ BuildRequires: mingw32-filesystem BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils BuildRequires: mingw32-glib2 >= 2.48 +BuildRequires: mingw32-libgpg-error +BuildRequires: mingw32-libgcrypt BuildRequires: mingw32-gnutls BuildRequires: mingw32-gettext BuildRequires: mingw32-libxml2 @@ -449,6 +453,8 @@ BuildRequires: mingw64-filesystem BuildRequires: mingw64-gcc BuildRequires: mingw64-binutils BuildRequires: mingw64-glib2 >= 2.48 +BuildRequires: mingw32-libgpg-error +BuildRequires: mingw32-libgcrypt BuildRequires: mingw64-gnutls BuildRequires: mingw64-gettext BuildRequires: mingw64-libxml2 @@ -614,7 +620,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 @@ -651,8 +657,6 @@ Requires: libvirt-libs = %{version}-%{release} Requires: nfs-utils # For mkfs Requires: util-linux -# For storage wiping with different algorithms -Requires: scrub %if %{with_qemu} # From QEMU RPMs Requires: /usr/bin/qemu-img @@ -1018,6 +1022,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} @@ -1028,6 +1033,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 @@ -1212,12 +1218,6 @@ MinGW Windows libvirt virtualization library. %define arg_nbdkit -Dnbdkit=disabled %endif -%if %{with_nbdkit_config_default} - %define arg_nbdkit_config_default -Dnbdkit_config_default=enabled -%else - %define arg_nbdkit_config_default -Dnbdkit_config_default=disabled -%endif - %if %{with_fuse} %define arg_fuse -Dfuse=enabled %else @@ -1333,7 +1333,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) %{?arg_sanlock} \ -Dlibpcap=enabled \ %{?arg_nbdkit} \ - %{?arg_nbdkit_config_default} \ -Dlibnl=enabled \ -Daudit=enabled \ -Ddtrace=enabled \ @@ -1399,7 +1398,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dhost_validate=disabled \ -Dlibiscsi=disabled \ -Dnbdkit=disabled \ - -Dnbdkit_config_default=disabled \ -Dlibnl=disabled \ -Dlibpcap=disabled \ -Dlibssh2=disabled \ @@ -1482,6 +1480,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 @@ -2361,11 +2365,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 @@ -2559,5 +2565,13 @@ exit 0 %endif %changelog +* Tue Apr 2 2024 mayunlong - 9.10.0-3 +- Incorrect tar package, update it + +* 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 0000000000000000000000000000000000000000..7278e7716abf78763e2dc9855a8dc99e6af52e2b --- /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 + diff --git a/nodedev-delete-mdev.patch b/nodedev-delete-mdev.patch new file mode 100644 index 0000000000000000000000000000000000000000..74280778d708be4748b348c32f46f4e1a26fb489 --- /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 +