[PATCH 0/3] qemu: Fix waiting for domain condition when qemu crashes
by Peter Krempa
See 3/4.
Peter Krempa (4):
qemuProcessBeginStopJob: Add debug log when waking up all threads
waiting on domain condition
qemu: Replace virDomainObjWait with qemuDomainObjWait
qemuDomainObjWait: Report error when VM is being destroyed
DO_NOT_APPLY_UPSTREAM: reproducer
src/qemu/qemu_block.c | 2 +-
src/qemu/qemu_domain.c | 17 +++++++++++++++++
src/qemu/qemu_domain.h | 3 +++
src/qemu/qemu_driver.c | 5 +++--
src/qemu/qemu_migration.c | 12 ++++++------
src/qemu/qemu_process.c | 1 +
6 files changed, 31 insertions(+), 9 deletions(-)
--
2.37.1
2 years, 4 months
Test failures on macOS 12
by Andrea Bolognani
I'm trying to enable CI coverage for macOS 12, but I'm running into a
couple of issues that I'm not sure how to handle.
Note that the test suite currently passes on macOS 11[1], so these
failures have to be a consequence to changes made to macOS that we
haven't yet learned how to cope with.
The first one is in vircryptotest:
Encrypt aes265cbc ... Expected ciphertext doesn't match
I've added some debug statements and it looks like the generated data
is different every time, which seems like a pretty good indication
that virrandommock is not being picked up correctly. This is not the
only test program that uses that specific mock though, so I'm not
sure what makes it fail when all the others are succeeding.
The other issue is in qemuxml2argvtest:
error : virCommandWait:2752 : internal error: Child process
(/usr/libexec/qemu/vhost-user/test-vhost-user-gpu --print-capabilities)
unexpected fatal signal 6: dyld[8896]: symbol not found in flat
namespace '_virQEMUCapsGet'
error : qemuVhostUserFillDomainGPU:394 : operation failed: Unable to
find a satisfying vhost-user-gpu
So the various virFileWrapperAddPrefix() calls that cause the
contents of tests/qemuvhostuserdata/ to override the host's own
vhostuser configuration are still effective, but for some reason the
trivial test-vhost-user-gpu shell script can't be run successfully
because an internal libvirt symbol can't be found somehow? Confusing.
Roman, does any of this ring a bell? Any chance you could
investigate? macOS 12 has been out for a while now so I'd be very
keen to have it added to CI.
Thanks in advance!
[1] https://gitlab.com/libvirt/libvirt/-/jobs/2421455154
--
Andrea Bolognani / Red Hat / Virtualization
2 years, 4 months
[PATCH 0/5] jobs: qemu & hypervisor: move hypervisor-based variables and functions
by Kristina Hanicova
*** BLURB HERE ***
Kristina Hanicova (5):
qemu: beginJob: move saveStatus into private job callbacks
hypervisor: domain_job: add maxQueuedJobs
qemu: remove unused driver and all its propagations
qemu: refactor functions with removed driver if possible
hypervisor: domain_job: add JobData private callbacks into
virDomainJobObj
src/ch/ch_domain.c | 2 +-
src/hypervisor/domain_job.c | 4 +-
src/hypervisor/domain_job.h | 8 +-
src/libxl/libxl_domain.c | 2 +-
src/lxc/lxc_domain.c | 2 +-
src/qemu/qemu_backup.c | 21 +-
src/qemu/qemu_backup.h | 3 +-
src/qemu/qemu_block.c | 26 +-
src/qemu/qemu_block.h | 6 +-
src/qemu/qemu_blockjob.c | 25 +-
src/qemu/qemu_blockjob.h | 3 +-
src/qemu/qemu_checkpoint.c | 15 +-
src/qemu/qemu_domain.c | 51 ++-
src/qemu/qemu_domain.h | 21 +-
src/qemu/qemu_domainjob.c | 45 +--
src/qemu/qemu_domainjob.h | 15 +-
src/qemu/qemu_driver.c | 581 +++++++++++++------------------
src/qemu/qemu_hotplug.c | 217 +++++-------
src/qemu/qemu_hotplug.h | 39 +--
src/qemu/qemu_migration.c | 235 ++++++-------
src/qemu/qemu_migration.h | 15 +-
src/qemu/qemu_migration_cookie.c | 5 +-
src/qemu/qemu_migration_params.c | 38 +-
src/qemu/qemu_migration_params.h | 15 +-
src/qemu/qemu_process.c | 201 +++++------
src/qemu/qemu_process.h | 12 +-
src/qemu/qemu_snapshot.c | 24 +-
tests/qemuhotplugtest.c | 6 +-
28 files changed, 699 insertions(+), 938 deletions(-)
--
2.37.1
2 years, 4 months
[PATCH] qemu: Fix indentation
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
src/qemu/qemu_capabilities.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f8e70470f6..79ef8b88ef 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3284,7 +3284,7 @@ virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps)
static int
virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
{
- return 0;
+ return 0;
}
#endif
--
2.37.1
2 years, 4 months
[PATCH v2 0/9] qemu: Enable SCHED_CORE for domains and helper processes
by Michal Privoznik
v2 of:
https://listman.redhat.com/archives/libvir-list/2022-May/230902.html
While technically, the original series was "just" and RFC, it got proper
review and thus I'm marking this as v2.
What's still missing?
=====================
* Per Dario's suggestion, we should take vcpu pinning (and possibly
emulator pinning as well) into account, so that the guest doesn't have
to do SCHED_CORE inside it.
* per-VM knob to enable/disable SCHED_CORE. But as discussed under my
RFC patches, it's probably not needed, at least for now. It can always
be added later, should somebody need it.
Diff to v1:
===========
* Turned qemu.conf knob into an enum rather than boolean, so that users
can chose whether helper processes are placed into the emulator group
too
* Cleaned up virCommand* code; per Dan's suggestion use one variable to
differentiate runAlone/runAmong states, instead of two.
Michal Prívozník (9):
qemu_dbus: Separate PID read code into qemuDBusGetPID
qemu_vhost_user_gpu: Export qemuVhostUserGPUGetPid()
qemu_tpm: Expose qemuTPMEmulatorGetPid()
qemu_virtiofs: Separate PID read code into qemuVirtioFSGetPid
virprocess: Core Scheduling support
virCommand: Introduce APIs for core scheduling
qemu_conf: Introduce a knob to set SCHED_CORE
qemu: Enable SCHED_CORE for domains and helper processes
qemu: Place helper processes into the same trusted group
src/libvirt_private.syms | 6 ++
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf.in | 14 ++++
src/qemu/qemu_conf.c | 42 ++++++++++
src/qemu/qemu_conf.h | 11 +++
src/qemu/qemu_dbus.c | 42 +++++++---
src/qemu/qemu_dbus.h | 4 +
src/qemu/qemu_extdevice.c | 120 ++++++++++++++++++++++++++++
src/qemu/qemu_extdevice.h | 3 +
src/qemu/qemu_process.c | 9 +++
src/qemu/qemu_security.c | 4 +
src/qemu/qemu_tpm.c | 2 +-
src/qemu/qemu_tpm.h | 7 ++
src/qemu/qemu_vhost_user_gpu.c | 2 +-
src/qemu/qemu_vhost_user_gpu.h | 8 ++
src/qemu/qemu_virtiofs.c | 41 +++++++---
src/qemu/qemu_virtiofs.h | 5 ++
src/qemu/test_libvirtd_qemu.aug.in | 1 +
src/util/vircommand.c | 63 +++++++++++++++
src/util/vircommand.h | 5 ++
src/util/virprocess.c | 124 +++++++++++++++++++++++++++++
src/util/virprocess.h | 8 ++
22 files changed, 494 insertions(+), 28 deletions(-)
--
2.35.1
2 years, 4 months
[PATCH 0/3] qemu: add support for the SCHED_DEADLINE scheduling policy
by Sasha Algisi
Hello everyone,
This patchset aims at adding support for the SCHED_DEADLINE Linux
scheduling policy for vcpus, io-threads and emulator processes.
In fact, libvirt currently supports SCHED_OTHER, SCHED_BATCH,
SCHED_IDLE, SCHE_FIFO and SCHED_RR, but not SCHED_DEADLINE.
SCHED_DEADLINE is a policy implementing an algorithm originating from
the real-time scheduling community, but it can be useful outside of
the real-time computing field as well.
It allows one to set a specific amount of CPU time that a task should
receive with a given periodicity, and withing a certain deadline.
E.g., task t should be scheduled at least for 50 ms every 100 ms. To
achieve this, it needs 3 parameters: runtime, deadline and period
(although period can just be equal to deadline, which is what happens
automatically if one sets period=0). It must always hold that:
runtime <= deadline <= period (and this is enforced by the kernel,
but checks are included in the patches, so that meaningful and easy
to interpret error messages can be printed to the user).
More info on SCHED_DEADLINE are available here:
https://docs.kernel.org/scheduler/sched-deadline.html
The interface will look like this, e.g., for setting SCHED_DEADLINE
as a policy for 3 (0-2) vcpus, with runtime = 10000000, deadline =
15000000 and period = 20000000:
<cputune>
...
<vcpusched vcpus="0-2" scheduler="deadline" runtime="10000000"
deadline="15000000" period="20000000"/>
...
</cputune>
This a link to a branch containing the patches:
https://gitlab.com/Algisi-00/libvirt/-/tree/sched-deadline
And this is the link to results of running the CI on such branch:
https://gitlab.com/Algisi-00/libvirt/-/pipelines/601795712
Note that the jobs that are failing are also failing in the exact
same way without these patches applied.
Feedback is welcome and very much appreciated.
Thanks and regards.
Sasha Algisi (3):
virprocess: define sched_attr and sched_setattr
virprocess: add the SCHED_DEADLINE scheduling policy
domain_conf: add SCHED_DEADLINE support in the XML configuration
NEWS.rst | 5 ++
docs/formatdomain.rst | 16 +++-
src/ch/ch_process.c | 3 +-
src/conf/domain_conf.c | 52 +++++++++++--
src/conf/domain_conf.h | 3 +
src/conf/schemas/domaincommon.rng | 16 ++++
src/qemu/qemu_process.c | 8 +-
src/util/virprocess.c | 123 +++++++++++++++++++++++++++++-
src/util/virprocess.h | 6 +-
9 files changed, 216 insertions(+), 16 deletions(-)
--
2.37.1
--
------------------------
Indirizzo istituzionale di posta elettronica
degli studenti e dei laureati dell'Università di TorinoOfficial University
of Turin email address for students and graduates
2 years, 4 months
[PATCH 0/5] bridge_driver: Enable virMacMap iff dnsmasq is started
by Michal Privoznik
See 5/5 for explanation.
Michal Prívozník (5):
bridge_driver: Set @dnsmasqStarted only after successful dnsmasq spawn
bridge_driver: Use g_autoptr() for virMacMap
virNetworkObjSetMacMap: take double pointer of @macmap
bridge_driver: Introduce a helper for virNetworkObjSetMacMap()
bridge_driver: Enable virMacMap iff dnsmasq is started
src/conf/virnetworkobj.c | 4 +--
src/conf/virnetworkobj.h | 2 +-
src/network/bridge_driver.c | 54 ++++++++++++++++++++-----------------
3 files changed, 32 insertions(+), 28 deletions(-)
--
2.35.1
2 years, 4 months
[libvirt PATCH] rpm: merge mingw sub-packages into native spec
by Daniel P. Berrangé
One specfile containing both native and mingw builds is the
new best practice for Fedora. This reduces the maint burden
and ensures the mingw packages don't fall behind.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitlab-ci.yml | 2 +-
libvirt.spec.in | 287 ++++++++++++++++++++++++++++++++++++
meson.build | 17 +--
mingw-libvirt.spec.in | 327 ------------------------------------------
4 files changed, 293 insertions(+), 340 deletions(-)
delete mode 100644 mingw-libvirt.spec.in
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6a8b89729f..39c5f8fb6d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,7 +33,7 @@ include:
- meson dist -C build --no-tests
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
- rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild/" -ta build/meson-dist/libvirt-*.tar.xz;
+ rpmbuild --clean --nodeps --define "_without_mingw 1" --define "_topdir $PWD/rpmbuild/" -ta build/meson-dist/libvirt-*.tar.xz;
mv rpmbuild/RPMS/x86_64/ libvirt-rpms/;
else
meson compile -C build;
diff --git a/libvirt.spec.in b/libvirt.spec.in
index a238edf2aa..fe386bfef2 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -197,6 +197,10 @@
%define qemu_moddir %{_libdir}/qemu
%define qemu_datadir %{_datadir}/qemu
+%define with_mingw 0
+%if 0%{?fedora}
+ %define with_mingw 0%{!?_without_mingw:1}
+%endif
# RHEL releases provide stable tool chains and so it is safe to turn
# compiler warning into errors without being worried about frequent
@@ -393,6 +397,36 @@ BuildRequires: libtirpc-devel
BuildRequires: firewalld-filesystem
%endif
+%if %{with_mingw}
+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
+BuildRequires: mingw32-portablexdr
+BuildRequires: mingw32-dlfcn
+BuildRequires: mingw32-libssh2
+BuildRequires: mingw32-curl
+
+BuildRequires: mingw64-filesystem
+BuildRequires: mingw64-gcc
+BuildRequires: mingw64-binutils
+BuildRequires: mingw64-glib2 >= 2.48
+BuildRequires: mingw64-libgpg-error
+BuildRequires: mingw64-libgcrypt
+BuildRequires: mingw64-gnutls
+BuildRequires: mingw64-gettext
+BuildRequires: mingw64-libxml2
+BuildRequires: mingw64-portablexdr
+BuildRequires: mingw64-dlfcn
+BuildRequires: mingw64-libssh2
+BuildRequires: mingw64-curl
+%endif
+
%description
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The main package includes
@@ -948,6 +982,25 @@ Requires: libvirt-daemon-driver-network = %{version}-%{release}
%description nss
Libvirt plugin for NSS for translating domain names into IP addresses.
+%if %{with_mingw}
+%package -n mingw32-libvirt
+Summary: %{summary}
+Obsoletes: mingw32-libvirt-static < 7.0.0
+BuildArch: noarch
+
+%description -n mingw32-libvirt
+MinGW Windows libvirt virtualization library.
+
+%package -n mingw64-libvirt
+Summary: %{summary}
+Obsoletes: mingw64-libvirt-static < 7.0.0
+BuildArch: noarch
+
+%description -n mingw64-libvirt
+MinGW Windows libvirt virtualization library.
+
+%{?mingw_debug_package}
+%endif
%prep
@@ -1191,6 +1244,84 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
%meson_build
+%if %{with_mingw}
+%mingw_meson \
+ --auto-features=enabled \
+ -Ddriver_remote=enabled \
+ -Ddriver_test=enabled \
+ -Ddriver_esx=enabled \
+ -Dcurl=enabled \
+ -Ddocs=enabled \
+ -Dapparmor=disabled \
+ -Dapparmor_profiles=disabled \
+ -Dattr=disabled \
+ -Daudit=disabled \
+ -Dbash_completion=disabled \
+ -Dblkid=disabled \
+ -Dcapng=disabled \
+ -Ddriver_bhyve=disabled \
+ -Ddriver_hyperv=disabled \
+ -Ddriver_interface=disabled \
+ -Ddriver_libvirtd=disabled \
+ -Ddriver_libxl=disabled \
+ -Ddriver_lxc=disabled \
+ -Ddriver_network=disabled \
+ -Ddriver_openvz=disabled \
+ -Ddriver_qemu=disabled \
+ -Ddriver_secrets=disabled \
+ -Ddriver_vbox=disabled \
+ -Ddriver_vmware=disabled \
+ -Ddriver_vz=disabled \
+ -Ddtrace=disabled \
+ -Dexpensive_tests=enabled \
+ -Dfirewalld=disabled \
+ -Dfirewalld_zone=disabled \
+ -Dfuse=disabled \
+ -Dglusterfs=disabled \
+ -Dhost_validate=disabled \
+ -Dlibiscsi=disabled \
+ -Dlibnl=disabled \
+ -Dlibpcap=disabled \
+ -Dlibssh2=disabled \
+ -Dlibssh=disabled \
+ -Dlogin_shell=disabled \
+ -Dnetcf=disabled \
+ -Dnls=disabled \
+ -Dnss=disabled \
+ -Dnumactl=disabled \
+ -Dnumad=disabled \
+ -Dopenwsman=disabled \
+ -Dpciaccess=disabled \
+ -Dpm_utils=disabled \
+ -Dpolkit=disabled \
+ -Dreadline=disabled \
+ -Drpath=disabled \
+ -Dsanlock=disabled \
+ -Dsasl=disabled \
+ -Dsecdriver_apparmor=disabled \
+ -Dsecdriver_selinux=disabled \
+ -Dselinux=disabled \
+ -Dstorage_dir=disabled \
+ -Dstorage_disk=disabled \
+ -Dstorage_fs=disabled \
+ -Dstorage_gluster=disabled \
+ -Dstorage_iscsi_direct=disabled \
+ -Dstorage_iscsi=disabled \
+ -Dstorage_lvm=disabled \
+ -Dstorage_mpath=disabled \
+ -Dstorage_rbd=disabled \
+ -Dstorage_scsi=disabled \
+ -Dstorage_sheepdog=disabled \
+ -Dstorage_vstorage=disabled \
+ -Dstorage_zfs=disabled \
+ -Dsysctl_config=disabled \
+ -Dtests=disabled \
+ -Dudev=disabled \
+ -Dwireshark_dissector=disabled \
+ -Dyajl=disabled
+%mingw_ninja
+%endif
+
%install
rm -fr %{buildroot}
@@ -1259,6 +1390,26 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
%endif
%endif
+%if %{with_mingw}
+%mingw_ninja_install
+
+rm -rf $RPM_BUILD_ROOT%{mingw32_sysconfdir}/libvirt/nwfilter
+rm -rf $RPM_BUILD_ROOT%{mingw64_sysconfdir}/libvirt/nwfilter
+rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/doc/*
+rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/doc/*
+rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/*
+rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/*
+
+rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt_iohelper.exe
+rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt_iohelper.exe
+rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt-guests.sh
+rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
+
+%mingw_debug_install_post
+
+%endif
+
+
%check
# Building on slow archs, like emulated s390x in Fedora copr, requires
# raising the test timeout
@@ -2119,5 +2270,141 @@ exit 0
%{_datadir}/libvirt/api/libvirt-qemu-api.xml
%{_datadir}/libvirt/api/libvirt-lxc-api.xml
+%if %{with_mingw}
+%files -n mingw32-libvirt
+%dir %{mingw32_sysconfdir}/libvirt/
+%config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt.conf
+%config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt-admin.conf
+
+%{mingw32_bindir}/libvirt-0.dll
+%{mingw32_bindir}/virsh.exe
+%{mingw32_bindir}/virt-admin.exe
+%{mingw32_bindir}/virt-xml-validate
+%{mingw32_bindir}/virt-pki-query-dn.exe
+%{mingw32_bindir}/virt-pki-validate
+%{mingw32_bindir}/libvirt-lxc-0.dll
+%{mingw32_bindir}/libvirt-qemu-0.dll
+%{mingw32_bindir}/libvirt-admin-0.dll
+
+%{mingw32_libdir}/libvirt.dll.a
+%{mingw32_libdir}/pkgconfig/libvirt.pc
+%{mingw32_libdir}/pkgconfig/libvirt-qemu.pc
+%{mingw32_libdir}/pkgconfig/libvirt-lxc.pc
+%{mingw32_libdir}/pkgconfig/libvirt-admin.pc
+%{mingw32_libdir}/libvirt-lxc.dll.a
+%{mingw32_libdir}/libvirt-qemu.dll.a
+%{mingw32_libdir}/libvirt-admin.dll.a
+
+%dir %{mingw32_datadir}/libvirt/
+%dir %{mingw32_datadir}/libvirt/schemas/
+%{mingw32_datadir}/libvirt/schemas/*.rng
+
+%dir %{mingw32_datadir}/libvirt/api/
+%{mingw32_datadir}/libvirt/api/libvirt-api.xml
+%{mingw32_datadir}/libvirt/api/libvirt-lxc-api.xml
+%{mingw32_datadir}/libvirt/api/libvirt-qemu-api.xml
+%{mingw32_datadir}/libvirt/api/libvirt-admin-api.xml
+
+%{mingw32_datadir}/libvirt/cpu_map/*.xml
+
+%{mingw32_datadir}/libvirt/test-screenshot.png
+
+%{mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
+
+%dir %{mingw32_includedir}/libvirt
+%{mingw32_includedir}/libvirt/libvirt.h
+%{mingw32_includedir}/libvirt/libvirt-common.h
+%{mingw32_includedir}/libvirt/libvirt-domain.h
+%{mingw32_includedir}/libvirt/libvirt-domain-checkpoint.h
+%{mingw32_includedir}/libvirt/libvirt-domain-snapshot.h
+%{mingw32_includedir}/libvirt/libvirt-event.h
+%{mingw32_includedir}/libvirt/libvirt-host.h
+%{mingw32_includedir}/libvirt/libvirt-interface.h
+%{mingw32_includedir}/libvirt/libvirt-network.h
+%{mingw32_includedir}/libvirt/libvirt-nodedev.h
+%{mingw32_includedir}/libvirt/libvirt-nwfilter.h
+%{mingw32_includedir}/libvirt/libvirt-secret.h
+%{mingw32_includedir}/libvirt/libvirt-storage.h
+%{mingw32_includedir}/libvirt/libvirt-stream.h
+%{mingw32_includedir}/libvirt/virterror.h
+%{mingw32_includedir}/libvirt/libvirt-lxc.h
+%{mingw32_includedir}/libvirt/libvirt-qemu.h
+%{mingw32_includedir}/libvirt/libvirt-admin.h
+
+%{mingw32_mandir}/man1/virsh.1*
+%{mingw32_mandir}/man1/virt-admin.1*
+%{mingw32_mandir}/man1/virt-xml-validate.1*
+%{mingw32_mandir}/man1/virt-pki-query-dn.1*
+%{mingw32_mandir}/man1/virt-pki-validate.1*
+%{mingw32_mandir}/man7/virkey*.7*
+
+
+%files -n mingw64-libvirt
+%dir %{mingw64_sysconfdir}/libvirt/
+%config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt.conf
+%config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt-admin.conf
+
+%{mingw64_bindir}/libvirt-0.dll
+%{mingw64_bindir}/virsh.exe
+%{mingw64_bindir}/virt-admin.exe
+%{mingw64_bindir}/virt-xml-validate
+%{mingw64_bindir}/virt-pki-query-dn.exe
+%{mingw64_bindir}/virt-pki-validate
+%{mingw64_bindir}/libvirt-lxc-0.dll
+%{mingw64_bindir}/libvirt-qemu-0.dll
+%{mingw64_bindir}/libvirt-admin-0.dll
+
+%{mingw64_libdir}/libvirt.dll.a
+%{mingw64_libdir}/pkgconfig/libvirt.pc
+%{mingw64_libdir}/pkgconfig/libvirt-qemu.pc
+%{mingw64_libdir}/pkgconfig/libvirt-lxc.pc
+%{mingw64_libdir}/pkgconfig/libvirt-admin.pc
+%{mingw64_libdir}/libvirt-lxc.dll.a
+%{mingw64_libdir}/libvirt-qemu.dll.a
+%{mingw64_libdir}/libvirt-admin.dll.a
+
+%dir %{mingw64_datadir}/libvirt/
+%dir %{mingw64_datadir}/libvirt/schemas/
+%{mingw64_datadir}/libvirt/schemas/*.rng
+
+%dir %{mingw64_datadir}/libvirt/api/
+%{mingw64_datadir}/libvirt/api/libvirt-api.xml
+%{mingw64_datadir}/libvirt/api/libvirt-lxc-api.xml
+%{mingw64_datadir}/libvirt/api/libvirt-qemu-api.xml
+%{mingw64_datadir}/libvirt/api/libvirt-admin-api.xml
+
+%{mingw64_datadir}/libvirt/cpu_map/*.xml
+
+%{mingw64_datadir}/libvirt/test-screenshot.png
+
+%{mingw64_datadir}/locale/*/LC_MESSAGES/libvirt.mo
+
+%dir %{mingw64_includedir}/libvirt
+%{mingw64_includedir}/libvirt/libvirt.h
+%{mingw64_includedir}/libvirt/libvirt-common.h
+%{mingw64_includedir}/libvirt/libvirt-domain.h
+%{mingw64_includedir}/libvirt/libvirt-domain-checkpoint.h
+%{mingw64_includedir}/libvirt/libvirt-domain-snapshot.h
+%{mingw64_includedir}/libvirt/libvirt-event.h
+%{mingw64_includedir}/libvirt/libvirt-host.h
+%{mingw64_includedir}/libvirt/libvirt-interface.h
+%{mingw64_includedir}/libvirt/libvirt-network.h
+%{mingw64_includedir}/libvirt/libvirt-nodedev.h
+%{mingw64_includedir}/libvirt/libvirt-nwfilter.h
+%{mingw64_includedir}/libvirt/libvirt-secret.h
+%{mingw64_includedir}/libvirt/libvirt-storage.h
+%{mingw64_includedir}/libvirt/libvirt-stream.h
+%{mingw64_includedir}/libvirt/virterror.h
+%{mingw64_includedir}/libvirt/libvirt-lxc.h
+%{mingw64_includedir}/libvirt/libvirt-qemu.h
+%{mingw64_includedir}/libvirt/libvirt-admin.h
+
+%{mingw64_mandir}/man1/virsh.1*
+%{mingw64_mandir}/man1/virt-admin.1*
+%{mingw64_mandir}/man1/virt-xml-validate.1*
+%{mingw64_mandir}/man1/virt-pki-query-dn.1*
+%{mingw64_mandir}/man1/virt-pki-validate.1*
+%{mingw64_mandir}/man7/virkey*.7*
+%endif
%changelog
diff --git a/meson.build b/meson.build
index 2d1ae4091a..0b3187ad88 100644
--- a/meson.build
+++ b/meson.build
@@ -2161,22 +2161,15 @@ endforeach
# generate dist files
if git
- spec_files = [
- 'libvirt.spec.in',
- 'mingw-libvirt.spec.in',
- ]
-
spec_conf = configuration_data({
'VERSION': meson.project_version(),
})
- foreach file : spec_files
- configure_file(
- input: file,
- output: '@BASENAME@',
- configuration: spec_conf,
- )
- endforeach
+ configure_file(
+ input: 'libvirt.spec.in',
+ output: '@BASENAME@',
+ configuration: spec_conf,
+ )
authors = run_command(python3_prog, meson_gen_authors_prog.path(),
env: runutf8, check: true)
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
deleted file mode 100644
index dbcb6d4b8f..0000000000
--- a/mingw-libvirt.spec.in
+++ /dev/null
@@ -1,327 +0,0 @@
-%{?mingw_package_header}
-
-# This spec file assumes you are building on a Fedora version
-# that's still supported by the vendor. It may work on other distros
-# or versions, but no effort will be made to ensure that going forward.
-%define min_fedora 33
-
-Name: mingw-libvirt
-Version: @VERSION@
-Release: 1%{?dist}
-Summary: MinGW Windows libvirt virtualization library
-
-License: LGPLv2+
-URL: https://libvirt.org/
-
-%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
- %define mainturl stable_updates/
-%endif
-Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
-
-BuildRequires: mingw32-filesystem >= 95
-BuildRequires: mingw64-filesystem >= 95
-BuildRequires: mingw32-gcc
-BuildRequires: mingw64-gcc
-BuildRequires: mingw32-binutils
-BuildRequires: mingw64-binutils
-BuildRequires: mingw32-glib2 >= 2.48
-BuildRequires: mingw64-glib2 >= 2.48
-BuildRequires: mingw32-libgpg-error
-BuildRequires: mingw64-libgpg-error
-BuildRequires: mingw32-libgcrypt
-BuildRequires: mingw64-libgcrypt
-BuildRequires: mingw32-gnutls
-BuildRequires: mingw64-gnutls
-BuildRequires: mingw32-gettext
-BuildRequires: mingw64-gettext
-BuildRequires: mingw32-libxml2
-BuildRequires: mingw64-libxml2
-BuildRequires: mingw32-portablexdr
-BuildRequires: mingw64-portablexdr
-BuildRequires: mingw32-dlfcn
-BuildRequires: mingw64-dlfcn
-
-BuildRequires: pkgconfig
-# Need native version for msgfmt
-BuildRequires: gettext
-BuildRequires: libxslt
-BuildRequires: python3
-BuildRequires: perl-interpreter
-BuildRequires: perl(Getopt::Long)
-BuildRequires: meson
-BuildRequires: ninja-build
-BuildRequires: python3-docutils
-
-BuildRequires: mingw32-libssh2
-BuildRequires: mingw64-libssh2
-BuildRequires: mingw32-curl
-BuildRequires: mingw64-curl
-BuildRequires: cpp
-%if 0%{?fedora} || 0%{?rhel} > 7
-BuildRequires: rpcgen
-%endif
-
-BuildArch: noarch
-
-%description
-MinGW Windows libvirt virtualization library.
-
-# Mingw32
-%package -n mingw32-libvirt
-Summary: %{summary}
-Obsoletes: mingw32-libvirt-static < 7.0.0
-
-%description -n mingw32-libvirt
-MinGW Windows libvirt virtualization library.
-
-# Mingw64
-%package -n mingw64-libvirt
-Summary: %{summary}
-Obsoletes: mingw64-libvirt-static < 7.0.0
-
-%description -n mingw64-libvirt
-MinGW Windows libvirt virtualization library.
-
-%{?mingw_debug_package}
-
-
-%prep
-%setup -q -n libvirt-%{version}
-
-%build
-%if 0%{?fedora} >= %{min_fedora}
- %define supported_platform 1
-%else
- %define supported_platform 0
-%endif
-
-%if ! %{supported_platform}
-echo "This RPM requires Fedora >= %{min_fedora}"
-exit 1
-%endif
-
-%mingw_meson \
- --auto-features=enabled \
- -Ddriver_remote=enabled \
- -Ddriver_test=enabled \
- -Ddriver_esx=enabled \
- -Dcurl=enabled \
- -Ddocs=enabled \
- -Dapparmor=disabled \
- -Dapparmor_profiles=disabled \
- -Dattr=disabled \
- -Daudit=disabled \
- -Dbash_completion=disabled \
- -Dblkid=disabled \
- -Dcapng=disabled \
- -Ddriver_bhyve=disabled \
- -Ddriver_hyperv=disabled \
- -Ddriver_interface=disabled \
- -Ddriver_libvirtd=disabled \
- -Ddriver_libxl=disabled \
- -Ddriver_lxc=disabled \
- -Ddriver_network=disabled \
- -Ddriver_openvz=disabled \
- -Ddriver_qemu=disabled \
- -Ddriver_secrets=disabled \
- -Ddriver_vbox=disabled \
- -Ddriver_vmware=disabled \
- -Ddriver_vz=disabled \
- -Ddtrace=disabled \
- -Dexpensive_tests=enabled \
- -Dfirewalld=disabled \
- -Dfirewalld_zone=disabled \
- -Dfuse=disabled \
- -Dglusterfs=disabled \
- -Dhost_validate=disabled \
- -Dlibiscsi=disabled \
- -Dlibnl=disabled \
- -Dlibpcap=disabled \
- -Dlibssh2=disabled \
- -Dlibssh=disabled \
- -Dlogin_shell=disabled \
- -Dnetcf=disabled \
- -Dnls=disabled \
- -Dnss=disabled \
- -Dnumactl=disabled \
- -Dnumad=disabled \
- -Dopenwsman=disabled \
- -Dpciaccess=disabled \
- -Dpm_utils=disabled \
- -Dpolkit=disabled \
- -Dreadline=disabled \
- -Drpath=disabled \
- -Dsanlock=disabled \
- -Dsasl=disabled \
- -Dsecdriver_apparmor=disabled \
- -Dsecdriver_selinux=disabled \
- -Dselinux=disabled \
- -Dstorage_dir=disabled \
- -Dstorage_disk=disabled \
- -Dstorage_fs=disabled \
- -Dstorage_gluster=disabled \
- -Dstorage_iscsi_direct=disabled \
- -Dstorage_iscsi=disabled \
- -Dstorage_lvm=disabled \
- -Dstorage_mpath=disabled \
- -Dstorage_rbd=disabled \
- -Dstorage_scsi=disabled \
- -Dstorage_sheepdog=disabled \
- -Dstorage_vstorage=disabled \
- -Dstorage_zfs=disabled \
- -Dsysctl_config=disabled \
- -Dtests=disabled \
- -Dudev=disabled \
- -Dwireshark_dissector=disabled \
- -Dyajl=disabled
-%mingw_ninja
-
-%install
-%mingw_ninja_install
-
-rm -rf $RPM_BUILD_ROOT%{mingw32_sysconfdir}/libvirt/nwfilter
-rm -rf $RPM_BUILD_ROOT%{mingw64_sysconfdir}/libvirt/nwfilter
-rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/doc/*
-rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/doc/*
-rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/*
-rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/*
-
-rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt_iohelper.exe
-rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt_iohelper.exe
-rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt-guests.sh
-rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
-
-
-# Mingw32
-%files -n mingw32-libvirt
-%dir %{mingw32_sysconfdir}/libvirt/
-%config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt.conf
-%config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt-admin.conf
-
-%{mingw32_bindir}/libvirt-0.dll
-%{mingw32_bindir}/virsh.exe
-%{mingw32_bindir}/virt-admin.exe
-%{mingw32_bindir}/virt-xml-validate
-%{mingw32_bindir}/virt-pki-validate
-%{mingw32_bindir}/libvirt-lxc-0.dll
-%{mingw32_bindir}/libvirt-qemu-0.dll
-%{mingw32_bindir}/libvirt-admin-0.dll
-
-%{mingw32_libdir}/libvirt.dll.a
-%{mingw32_libdir}/pkgconfig/libvirt.pc
-%{mingw32_libdir}/pkgconfig/libvirt-qemu.pc
-%{mingw32_libdir}/pkgconfig/libvirt-lxc.pc
-%{mingw32_libdir}/pkgconfig/libvirt-admin.pc
-%{mingw32_libdir}/libvirt-lxc.dll.a
-%{mingw32_libdir}/libvirt-qemu.dll.a
-%{mingw32_libdir}/libvirt-admin.dll.a
-
-%dir %{mingw32_datadir}/libvirt/
-%dir %{mingw32_datadir}/libvirt/schemas/
-%{mingw32_datadir}/libvirt/schemas/*.rng
-
-%dir %{mingw32_datadir}/libvirt/api/
-%{mingw32_datadir}/libvirt/api/libvirt-api.xml
-%{mingw32_datadir}/libvirt/api/libvirt-lxc-api.xml
-%{mingw32_datadir}/libvirt/api/libvirt-qemu-api.xml
-%{mingw32_datadir}/libvirt/api/libvirt-admin-api.xml
-
-%{mingw32_datadir}/libvirt/cpu_map/*.xml
-
-%{mingw32_datadir}/libvirt/test-screenshot.png
-
-%{mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
-
-%dir %{mingw32_includedir}/libvirt
-%{mingw32_includedir}/libvirt/libvirt.h
-%{mingw32_includedir}/libvirt/libvirt-common.h
-%{mingw32_includedir}/libvirt/libvirt-domain.h
-%{mingw32_includedir}/libvirt/libvirt-domain-checkpoint.h
-%{mingw32_includedir}/libvirt/libvirt-domain-snapshot.h
-%{mingw32_includedir}/libvirt/libvirt-event.h
-%{mingw32_includedir}/libvirt/libvirt-host.h
-%{mingw32_includedir}/libvirt/libvirt-interface.h
-%{mingw32_includedir}/libvirt/libvirt-network.h
-%{mingw32_includedir}/libvirt/libvirt-nodedev.h
-%{mingw32_includedir}/libvirt/libvirt-nwfilter.h
-%{mingw32_includedir}/libvirt/libvirt-secret.h
-%{mingw32_includedir}/libvirt/libvirt-storage.h
-%{mingw32_includedir}/libvirt/libvirt-stream.h
-%{mingw32_includedir}/libvirt/virterror.h
-%{mingw32_includedir}/libvirt/libvirt-lxc.h
-%{mingw32_includedir}/libvirt/libvirt-qemu.h
-%{mingw32_includedir}/libvirt/libvirt-admin.h
-
-%{mingw32_mandir}/man1/virsh.1*
-%{mingw32_mandir}/man1/virt-admin.1*
-%{mingw32_mandir}/man1/virt-xml-validate.1*
-%{mingw32_mandir}/man1/virt-pki-validate.1*
-%{mingw32_mandir}/man7/virkey*.7*
-
-# Mingw64
-%files -n mingw64-libvirt
-%dir %{mingw64_sysconfdir}/libvirt/
-%config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt.conf
-%config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt-admin.conf
-
-%{mingw64_bindir}/libvirt-0.dll
-%{mingw64_bindir}/virsh.exe
-%{mingw64_bindir}/virt-admin.exe
-%{mingw64_bindir}/virt-xml-validate
-%{mingw64_bindir}/virt-pki-validate
-%{mingw64_bindir}/libvirt-lxc-0.dll
-%{mingw64_bindir}/libvirt-qemu-0.dll
-%{mingw64_bindir}/libvirt-admin-0.dll
-
-%{mingw64_libdir}/libvirt.dll.a
-%{mingw64_libdir}/pkgconfig/libvirt.pc
-%{mingw64_libdir}/pkgconfig/libvirt-qemu.pc
-%{mingw64_libdir}/pkgconfig/libvirt-lxc.pc
-%{mingw64_libdir}/pkgconfig/libvirt-admin.pc
-%{mingw64_libdir}/libvirt-lxc.dll.a
-%{mingw64_libdir}/libvirt-qemu.dll.a
-%{mingw64_libdir}/libvirt-admin.dll.a
-
-%dir %{mingw64_datadir}/libvirt/
-%dir %{mingw64_datadir}/libvirt/schemas/
-%{mingw64_datadir}/libvirt/schemas/*.rng
-
-%dir %{mingw64_datadir}/libvirt/api/
-%{mingw64_datadir}/libvirt/api/libvirt-api.xml
-%{mingw64_datadir}/libvirt/api/libvirt-lxc-api.xml
-%{mingw64_datadir}/libvirt/api/libvirt-qemu-api.xml
-%{mingw64_datadir}/libvirt/api/libvirt-admin-api.xml
-
-%{mingw64_datadir}/libvirt/cpu_map/*.xml
-
-%{mingw64_datadir}/libvirt/test-screenshot.png
-
-%{mingw64_datadir}/locale/*/LC_MESSAGES/libvirt.mo
-
-%dir %{mingw64_includedir}/libvirt
-%{mingw64_includedir}/libvirt/libvirt.h
-%{mingw64_includedir}/libvirt/libvirt-common.h
-%{mingw64_includedir}/libvirt/libvirt-domain.h
-%{mingw64_includedir}/libvirt/libvirt-domain-checkpoint.h
-%{mingw64_includedir}/libvirt/libvirt-domain-snapshot.h
-%{mingw64_includedir}/libvirt/libvirt-event.h
-%{mingw64_includedir}/libvirt/libvirt-host.h
-%{mingw64_includedir}/libvirt/libvirt-interface.h
-%{mingw64_includedir}/libvirt/libvirt-network.h
-%{mingw64_includedir}/libvirt/libvirt-nodedev.h
-%{mingw64_includedir}/libvirt/libvirt-nwfilter.h
-%{mingw64_includedir}/libvirt/libvirt-secret.h
-%{mingw64_includedir}/libvirt/libvirt-storage.h
-%{mingw64_includedir}/libvirt/libvirt-stream.h
-%{mingw64_includedir}/libvirt/virterror.h
-%{mingw64_includedir}/libvirt/libvirt-lxc.h
-%{mingw64_includedir}/libvirt/libvirt-qemu.h
-%{mingw64_includedir}/libvirt/libvirt-admin.h
-
-%{mingw64_mandir}/man1/virsh.1*
-%{mingw64_mandir}/man1/virt-admin.1*
-%{mingw64_mandir}/man1/virt-xml-validate.1*
-%{mingw64_mandir}/man1/virt-pki-validate.1*
-%{mingw64_mandir}/man7/virkey*.7*
-
-%changelog
--
2.37.1
2 years, 4 months