mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00

Bumping libvirt to version v11.1.0, which comprises the following commits: 9cd0673748 Release of libvirt-11.1.0 2c4e820188 Translated using Weblate (Korean) 538b50f0c9 NEWS: Document crasher fix in qemuDomainCheckCPU d99d3e1232 NEWS: Document features/improvements/bug fixes I've participated in 4809604315 Translated using Weblate (Ukrainian) ffeb1c99fc Translated using Weblate (Korean) 98262a61b2 docs: formatdomain: fix typo in passt section aae38da829 qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to 'v9.2.0-1967-gb69801dd6b' 291186daa3 apparmor: Allow SGX if configured 5c78395bad cpu: Do not call g_strv_contains on NULL list d36c91ae14 run: Use correct SELinux context for modular daemons 9433433ddf Update translation files ce88939324 po: Refresh potfile for v11.1.0 ce66d7e01b build: Enable syntax checks for vshError and vshWarn 2844744346 virsh: Let prohibit_newline_at_end_of_diagnostic check pass ffad5ce459 virsh: Drop extra newlines at the end of error messages ad59ebb8d0 virsh: Avoid using translated messages without format ad57923b36 virsh: Properly mark all error messages for translation 644f56f9d5 virsh: Do not require \n in vshDebug messages 2fb76aeae6 virsh: Warn when hypervisor-cpu-* is used with host CPU 71fe4b97a9 virsh: Introduce vshWarn c12f92a05e virsh: Refactor vshError ddef7271fd virsh: Make messages printed by vshError properly translatable 575b3ea925 virsh: Do not format messages twice af0507e2e4 docs: Clarify documentation of virsh hypervisor-cpu-baseline e8323cc7db docs: Clarify documentation of virsh hypervisor-cpu-compare c721f9ef78 Translated using Weblate (Chinese (Simplified) (zh_CN)) 4e963f590f Translated using Weblate (Telugu) be5332c81d schema: fix <interleave> errors when validating <domain> subelements 6f70da39c1 tests: be consistent about following DO_TEST_*() with a ; d78260cd3f conf: Validate that iothreads are used only with 'virtio-scsi' controllers 1b4e451dcb conf: schemas: Rename 'diskDriverIothreads' to 'iothreadMapping' e1c3fead7d qemuValidateCheckSCSIControllerIOThreads: Return '0' and '-1' instead of bools a2183d9a13 qemu: validate: Extract iothread mapping validation code a21319bb94 qemu: command: Rename 'qemuBuildDiskDeviceIothreadMappingProps' to 'qemuBuildIothreadMappingProps' 3313ab3932 hypervisor: domain: Extract code for checking iothread usage 79c68ae313 conf: domain: Extract code for parsing and formatting iothread mapping definition 4b651cf890 conf: Rename 'virDomainDiskIothreadDef' to 'virDomainIothreadMappingDef' 33ae851409 docs: formatdomain: Mention that vhostuser interface with mode='server' waits for connection 1348aa8f6e docs: formatdomain: Document few NVRAM config limitations f0c9c34d58 qemuDomainGetStats: Convert worker functions to void 4086f9ed5c qemuDomainGetStatsDirtyRate: Don't error out a0122665c6 qemuDomainGetStatsMemoryBandwidth: Don't error out a761c44b90 qemuDomainGetStatsIOThread: Don't error out if fetching iothread info fails f05f54d8fb qemuDomainGetStatsPerfOneEvent: Ignore erros from 'virPerfReadEvent' 613901baec virPerfReadEvent: Refactor to return -errno on failure a4c0c6fd9f qemuDomainGetStatsCpuCache: Don't error out f660984273 qemuDomainGetStatsCpuHaltPollTime: Remove return value acad77f04b qemuDomainGetStatsCpuProc: Remove return value a90df14a35 qemuDomainGetStatsCpuCgroup: Remove return value 3518f46cba virBitmapFormat: Don't check return value a44a48b681 virDomainCputuneDefFormat: Refactor bitmap formatting 5e4262b9ac virDomainResctrlMonDefParse: Refactor temporary variables 13c54c8945 virBitmapFormat: Clarify returned values 3c6d78aff7 qemuDomainGetStatsBlockExportHeader: Remove return value a4b5ef9c87 qemuDomainStorageAlias: Remove NULL checks from callers f5e4c2a508 qemuDomainGetStatsOneBlock: Remove return value e5b0612021 qemuDomainGetStatsOneBlockFallback: Remove return value 924805d29c qemuDomainGetStatsBlockExportBackendStorage: Remove return value 016fa9d73c qemuDomainGetStatsBlockExportFrontend: Remove return value b14968e6bd qemuDomainGetStatsBlockExportHeader: Remove return value d86e1aa510 build-aux: squelch trailing blank warnings from binary files 43eae1b707 qemu: Avoid crash in qemuDomainCheckCPU with unknown host CPU 08db3e8dc2 util: fix compile warning in virsystemd.c during mingw builds f2023e8018 utils: Canonicalize paths before comparing them b5dfcdc7ab docs: index: fix VMware capitalization 526f794b54 news: include info about supporting vhostuser+passt combination 96fd17a99b docs: document using passt backend with <interface type='vhostuser'> a47a89a9d3 docs: improve type='user' docs to higlight differences between SLIRP and passt 70bce2e6ee qemu: fail validation if a domain def has vhostuser/passt but no shared mem 1e9054b9c7 qemu: complete vhostuser + passt support 7b7c56c3b8 qemu: make qemuPasstCreateSocketPath() public 6fe3d765e5 qemu: use switch instead of if in qemuProcessPrepareDomainNetwork() fb4bfa7858 conf/qemu: make <source> element *almost* optional for type=vhostuser 56f4cc167a qemu: do all vhostuser attribute validation in qemu driver c4746418d7 qemu: automatically set model type='virtio' for interface type='vhostuser' 154d44a585 qemu: validate that model is virtio for vhostuser and vdpa interfaces in the same place 6345ee60d8 qemu: fix qemu validation to forbid guest-side IP address for type='vdpa' 956c668411 conf: change virDomainHostdevInsert() to return void 3d3ac7964f NEWS: Document ccwgroup based qeth device support 715bfc5e54 remote_daemon: Silence DBus errors 0428c69b09 virgdbus: Introduce virGDBusHasSessionBus() 827a062e3c Translated using Weblate (English (United Kingdom)) bccbb592de qemu: add 'auto_start_delay' configuration parameter 1e9d58ef49 hypervisor: add support for delay interval during autostart c23554fc34 src: convert drivers over to use new autostart helper c0cdbecdaa hypervisor: introduce helper for autostart 8a6088221a remote: notify systemd when reloading config 785cd56e58 util: add APIs for more systemd notifications 354b455ec6 bhyve: stop opening & passing connection to bhyveProcessStart 2eb1de2a16 bhyve: add 'driver' to bhyveProcessStart method 2626fa0569 qemu: migration: Reactivate block nodes after migration if VM is left paused d8f9cfb5e4 qemu: monitor: Add monitor backend for 'blockdev-set-active' b402e167b6 qemu: capabilies: Introduce QEMU_CAPS_BLOCKDEV_SET_ACTIVE c8c2996b2b qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to 'v9.2.0-1636-gffaf7f0376' ba4b9a7d8f qemu-replies-tool: Dump also query string for optional members 29d77d1a64 qemu: snapshot: Limit scope of checkpoint-snapshot interlock 5def28df55 qemu: fix qemuDomainSaveImageDefineXML f1bd98f887 ci: refresh with 'lcitool manifest' b1e9699b31 node_device: Do not lock the driver state needlessly b6f4466b1b Translated using Weblate (English (United Kingdom)) ac9500aaf8 Translated using Weblate (Romanian) 662d47845c Translated using Weblate (Spanish) af732d27cc node_device_udev: add error reporting to udevProcessCCWGroup 5830e564bb qemu: domain: Initialize FD passthrough for a virStorageSource before using it 7a119483a3 qemuxmlconftest: Add testing of FDs with 'writable' flag in 'disk-source-fd' 500d985a13 qemuxmlconftest: Allow testing of the 'writable' flag for passed FDs for disks 8e48a4fafb Translated using Weblate (Spanish) 105c33bfe7 docs: Reword virDomainGetEmulatorPinInfo description 14af443139 tests: qemuxmlconfdata: Update launch-security-sev-snp.xml 8a92493596 nodedev: udev: Hook up virFileWaitForExist to address uevent race of pci device 946b81a2e9 qemu: Attach persistent reservations manager if block-copy target requires it 1697323bfe qemu: blockjob: Remove persistent reservations manager when dropping disk images fc5b6ed091 qemu: hotplug: Export persistent reservations manager helper functions 8e0591520f virDomainDefHasManagedPR: Consider also disk's 'mirror' chain 7087d8b46f qemu_hotplug.h: Reformat according to new coding style 712c39f987 qemucapabilitiestest: Add data for the qemu-10.0 dev cycle on x86_64 fde300fa74 qemucapabilitiestest: Final update for qemu-9.2 release on x86_64 650e6fb7eb qemu: snapshot: Ensure that NVRAM image exists when taking inactive internal snapshot a377404ed9 qemu: process: Export qemuPrepareNVRAM for use in snapshot code d15eff6304 qemuSnapshotForEachQcow2: Don't initialize 'nrollback' 15cd4ec832 node_device_udev: Fix build failure in ccw device code 78f72efddc nodedev: add qeth layer2 and layer3 device types 55e921d5cb nodedev: add ccwgroup capability support to ccw devices 985cb9c32a nodedev: add ccwgroup node device support de4c28cd4a nodedev: refactor udevCCWGetState 20560cb6c4 nodedev: refactor CCW state format for use in ccwgroup 1260f3bd4f nodedev: remove virNodeDeviceCapCCWDefFormat 7ad25b4665 nodedev: refactor CCW device address 04de9ad285 nodedev: refactor CCW device address format 0d9d439175 docs: fix 'virsh domstats --vcpu' measure units and descriptions 4589468c69 Translated using Weblate (Chinese (Traditional) (zh_TW)) da17a3558a Translated using Weblate (Spanish) 4557ac4c77 NEWS: Mention preserving I/O error messages for qemu VMs 97c47333cb include: libvirt-domain: Add 'message' @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON 3a3c5616eb include: libvirt-domain: Reword documentation for @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON 666219f5f1 virDomainGetMessages: Introduce VIR_DOMAIN_MESSAGE_IOERRORS 1a02760cc6 virDomainObjGetMessages: Refactor using GPtrArray 042ea8630b libxlDomainGetMessages: Add existing flags to 'virCheckFlags' 18f8d572be qemuProcessHandleIOError: Log IO errors in the VM log file 300f7e9bd4 qemuProcessHandleIOError: Populate I/O error reason to virStorageSource 2f6c9fa4f6 virStorageSource: Add fields for storing last I/O error message 0525323175 qemuMonitorJSONHandleIOError: Propagate new 'qom-path' field 784538a470 qemuProcessHandleIOError: Prefer lookup by node name f8f8d5a253 qemuMonitorJSONHandleIOError: Do not munge 'reason' field of IO error event 590a5765c1 qemuProcessHandleIOError: Rename local variables 2d6bd6f05f qemu: Rename 'diskAlias' to 'device' in qemu IO error event handling 2f8359f827 qemu: Handle quirks of 'device' field of BLOCK_IO_ERROR event in monitor code 22e90a3b17 NEWS: Document virtio-mem-ccw f23f8ff91a qemuxmlconftest: Introduce memory-hotplug-virtio-mem-ccw-s390x.xml ee0320a7fc qemu: Allow virtio-mem on CCW 541dfe40bc qemu: Validate virtio-mem-ccw a46e33a925 qemu_caps: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW 621373d8a8 qemuxmlconftest: Introduce memory-hotplug-virtio-mem-pci-s390x.xml 89d56c41ac qemu_command: Use qemuBuildVirtioDevProps() to build cmd line for virtio-mem and virtio-pmem a8ed747b9a qemu: Do NOT autoadd NUMA node for s390 17f3a9114c libvirt.spec.in: fix indentation cf32953f5b rpm: disable account creation for Fedora >= 42 2dd4f594ea tools: add sysusers file to create 'virtlogin' group ff77c2d596 NEWS: Document VBOX-6.1 removal da9a804f4e vbox: Drop code supporting old VBox version 335bceb115 vbox: Drop support for VirtualBox-6.1.x 5ca7f27f75 vbox: Report an error when VBox CAPI initialization fails 10320ad526 vbox: Use g_autofree in tryLoadOne() 4118e79f3e qemu: Check for valid save image format when verifying image header 517248e239 qemu: Decompose qemuSaveImageOpen 50d65b94ef qemu: Move unlinking corrupt save image file to caller 18f0160994 remote: add sysusers file to create 'libvirt' group 1e88b8983c glibcompat: Sync g_string_replace() 8cf042d983 docs: add missing cellNum parameter in function call c1166be347 qemuSnapshotDeleteValidate: Fix crash when disk is not found in VM definition 00f9f2ca1f qemu: Check empty drives in block I/O throttle API fce24e433b Support IDE/SATA disk 'product' parameter 443ae4adec qemu_snapshot: allow reverting to external disk only snapshot 2c79c42477 tools: Move libvirt-guests lock file out of subsys directory 1cc990a1d0 virsh: pool-list: remove unnecessary spaces to align behavior f6d76aad80 docs: Document that 'vcpu.delay' statistic is in nanoseconds 0264a7704a Translated using Weblate (Romanian) 879ee4aee8 Translated using Weblate (Korean) c4c05c8655 Translated using Weblate (Spanish) 008560b0b2 Translated using Weblate (Italian) 72142dcde3 qemuProcessHandleIOError: Refactor to extract 'priv' instead of 'driver' 420c39d6bd build: Bump minimum glib2 version to 2.66.0 62b961d64c conf: check size of secret file for secret object 4819a14fec ch: Include unistd.h in ch_events.c 8b1578ab4b qemu: Allow virDomainBlockJobSetSpeed during migration d9fca42e40 qemu: Add support for avail-switchover-bandwidth migration parameter 4bd103dde6 virsh migrate: Add --available-switchover-bandwidth option c417ebf660 Add a migration parameter for available bandwidth in switchover 32cf090b84 rpm: Unify handling of directories used for loadable modules 40b5c302ab rpm: Add missing Requires 676453a0a7 meson: Unify handling of directories used for loadable modules e797c3e3b3 ch: implement domainInterfaceAddresses a9c73ac255 NEWS: Mention event handling support in ch driver 90299b0c6c ch: events: facilitate lifecycle events handling 104b0036ad ch: events: Read and parse cloud-hypervisor events 3015c28c1e ch: start a new thread for handling ch events d7c9660b15 ch: pass --event-monitor option to cloud-hypervisor f044f17825 .mailmap: add my contact info 5624489251 qemu: add RISC-V 'aia' command line 817eabd0cc conf,qemu: implement RISC-V 'aia' virt domain feature 34d7f53d1b qemu: add capability for RISC-V AIA feature 3e9440dbcb virsysinfo: fix RISC-V detection 652b2eeaa9 tests: add capabilities for QEMU 10.0.0 on s390x 0ca8d870a2 qemu: Fix hang when migration is canceled at the last moment ab10c0695d tools: ssh-proxy: Check for domain status before parsing its CID 63a3d70697 nss: Skip empty files and avoid use of uninitialized value a2297fb157 libvirt.spec: do not build ch driver on mingw 064b3a276d meson: error out when ch driver is requested but unsupported 981929112c spec: Only build ch driver on x86_64 and aarch64 22034bb77e storage_file_backend_fs: Compile out 'chown' backend on mingw 7a8c2319ac libvirt.spec: Move ownership of 'storage-file' backends directory to gluster 4933dfcce0 qemuxmlconftest: Drop s390-default-cpu-...ccw-virtio-2.7 test cases 06a7866d68 NEWS: Mention de-modularization of the 'fs' storage file backend f8558a87ac storage_file: de-modularize the local file backend e6a4245d2a virstoragetest: Add case for qcow2 image with empty string as 'data_file' 87a4fe2906 storage_file: Refuse qcow2 images with empty string as 'data_file' a10728dc5b util: avoid overflow in hextable buffer d908693167 Translated using Weblate (Spanish) 095760cddc cpu_x86: Probe host CPU for all MSR features 3766891c59 qemu_migration: Do not automatically resume domain after I/O error e46e64be50 qemu_migration: Refactor qemuMigrationSrcRestoreDomainState 899bf2746a qemu: Report error from both sides of migration Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
337 lines
14 KiB
BlitzBasic
337 lines
14 KiB
BlitzBasic
DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux."
|
|
HOMEPAGE = "http://libvirt.org"
|
|
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|
file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d"
|
|
SECTION = "console/tools"
|
|
|
|
DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
|
|
iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper libtirpc \
|
|
python3-docutils-native \
|
|
${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)} \
|
|
${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls-native', '', d)}"
|
|
|
|
# libvirt-guests.sh needs gettext.sh
|
|
#
|
|
RDEPENDS:${PN} = "gettext-runtime"
|
|
|
|
RDEPENDS:libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables"
|
|
RDEPENDS:libvirt-libvirtd:append:x86-64 = " dmidecode"
|
|
RDEPENDS:libvirt-libvirtd:append:x86 = " dmidecode"
|
|
RDEPENDS:libvirt-libvirtd:append:arm = " dmidecode"
|
|
RDEPENDS:libvirt-libvirtd:append:aarch64 = " dmidecode"
|
|
|
|
#connman blocks the 53 port and libvirtd can't start its DNS service
|
|
RCONFLICTS:${PN}_libvirtd = "connman"
|
|
|
|
SRCREV_libvirt = "9cd06737487c8ee311f71b7288c46a5cc70a700a"
|
|
|
|
LIBVIRT_VERSION = "11.1.0"
|
|
PV = "v${LIBVIRT_VERSION}+git"
|
|
|
|
SRC_URI = "gitsm://github.com/libvirt/libvirt.git;name=libvirt;protocol=https;branch=master \
|
|
file://libvirtd.sh \
|
|
file://libvirtd.conf \
|
|
file://dnsmasq.conf \
|
|
file://hook_support.py \
|
|
file://gnutls-helper.py;subdir=${BP} \
|
|
file://libvirt-qemu.conf \
|
|
file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \
|
|
file://0001-messon.build-remove-build-path-information-to-avoid-.patch \
|
|
file://0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch \
|
|
file://0001-tests-meson-clear-absolute-directory-paths.patch \
|
|
file://0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch \
|
|
"
|
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative
|
|
USERADD_PACKAGES = "${PN}"
|
|
GROUPADD_PARAM:${PN} = "-r qemu; -r kvm"
|
|
USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu"
|
|
|
|
|
|
EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross"
|
|
do_write_config:append() {
|
|
cat >${WORKDIR}/meson-${PN}.cross <<EOF
|
|
[binaries]
|
|
iptables = '/usr/sbin/iptables'
|
|
ip6tables = '/usr/sbin/ip6tables'
|
|
dmidecode = '/usr/sbin/dmidecode'
|
|
ebtables = '/sbin/ebtables'
|
|
dnsmasq = '/usr/bin/dnsmasq'
|
|
EOF
|
|
}
|
|
|
|
ALLOW_EMPTY:${PN} = "1"
|
|
INSANE_SKIP:${PN} += "empty-dirs"
|
|
|
|
PACKAGES =+ "${PN}-libvirtd ${PN}-virsh"
|
|
|
|
ALLOW_EMPTY:${PN}-libvirtd = "1"
|
|
|
|
FILES:${PN}-libvirtd = " \
|
|
${sysconfdir}/init.d \
|
|
${sysconfdir}/sysctl.d \
|
|
${sysconfdir}/logrotate.d \
|
|
${sysconfdir}/libvirt/libvirtd.conf \
|
|
/usr/lib/sysctl.d/60-libvirtd.conf \
|
|
/usr/lib/sysctl.d/60-qemu-postcopy-migration.conf \
|
|
${sbindir}/libvirtd \
|
|
${systemd_system_unitdir} \
|
|
${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', '${libexecdir}/libvirt-guests.sh', d)} \
|
|
${@bb.utils.contains('PACKAGECONFIG', 'gnutls', '${sysconfdir}/pki/libvirt/* ${sysconfdir}/pki/CA/*', '', d)} \
|
|
"
|
|
|
|
FILES:${PN}-virsh = " \
|
|
${bindir}/virsh \
|
|
${datadir}/bash-completion/completions/virsh \
|
|
"
|
|
RDEPENDS:${PN}-virsh = "${PN}-libvirtd"
|
|
|
|
FILES:${PN} += "${libdir}/libvirt/connection-driver \
|
|
${datadir}/augeas \
|
|
${@bb.utils.contains('PACKAGECONFIG', 'polkit', '${datadir}/polkit-1', '', d)} \
|
|
${datadir}/bash-completion/completions/vsh \
|
|
${datadir}/bash-completion/completions/virt-admin \
|
|
/usr/lib/firewalld/ \
|
|
${nonarch_libdir}/sysusers.d/ \
|
|
"
|
|
|
|
FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug"
|
|
FILES:${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a"
|
|
|
|
CONFFILES:${PN} += "${sysconfdir}/libvirt/libvirt.conf \
|
|
${sysconfdir}/libvirt/lxc.conf \
|
|
${sysconfdir}/libvirt/qemu-lockd.conf \
|
|
${sysconfdir}/libvirt/qemu.conf \
|
|
${sysconfdir}/libvirt/virt-login-shell.conf \
|
|
${sysconfdir}/libvirt/virtlockd.conf"
|
|
|
|
CONFFILES:${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \
|
|
${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \
|
|
${sysconfdir}/libvirt/libvirtd.conf \
|
|
/usr/lib/sysctl.d/libvirtd.conf"
|
|
|
|
INITSCRIPT_PACKAGES = "${PN}-libvirtd"
|
|
INITSCRIPT_NAME:${PN}-libvirtd = "libvirtd"
|
|
INITSCRIPT_PARAMS:${PN}-libvirtd = "defaults 72"
|
|
|
|
SYSTEMD_PACKAGES = "${PN}-libvirtd"
|
|
SYSTEMD_SERVICE:${PN}-libvirtd = " \
|
|
libvirtd.service \
|
|
virtlockd.service \
|
|
libvirt-guests.service \
|
|
virtlockd.socket \
|
|
"
|
|
|
|
# xen-minimal config
|
|
#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd"
|
|
|
|
# full config
|
|
PACKAGECONFIG ??= "gnutls qemu openvz vmware vbox esx lxc test remote \
|
|
libvirtd netcf udev python fuse firewalld libpcap \
|
|
${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \
|
|
${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \
|
|
${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'polkit', '', d)} \
|
|
"
|
|
|
|
# qemu is NOT compatible with mips64, powerpc and riscv32
|
|
PACKAGECONFIG:remove:mipsarchn32 = "qemu"
|
|
PACKAGECONFIG:remove:mipsarchn64 = "qemu"
|
|
PACKAGECONFIG:remove:powerpc = "qemu"
|
|
PACKAGECONFIG:remove:riscv32 = "qemu"
|
|
|
|
# numactl is NOT compatible with arm
|
|
PACKAGECONFIG:remove:arm = "numactl"
|
|
PACKAGECONFIG:remove:armeb = "numactl"
|
|
|
|
# enable,disable,depends,rdepends
|
|
#
|
|
PACKAGECONFIG[gnutls] = ",,,gnutls-bin"
|
|
PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu json-c,"
|
|
PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen,"
|
|
PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,,"
|
|
PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,,"
|
|
PACKAGECONFIG[vbox] = "-Ddriver_vbox=enabled,-Ddriver_vbox=disabled,,"
|
|
PACKAGECONFIG[esx] = "-Ddriver_esx=enabled,-Ddriver_esx=disabled,,"
|
|
PACKAGECONFIG[hyperv] = "-Ddriver_hyperv=enabled,-Ddriver_hyperv=disabled,,"
|
|
PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit,polkit"
|
|
PACKAGECONFIG[lxc] = "-Ddriver_lxc=enabled,-Ddriver_lxc=disabled,lxc,"
|
|
PACKAGECONFIG[test] = "-Ddriver_test=enabled,-Ddriver_test=disabled,,"
|
|
PACKAGECONFIG[remote] = "-Ddriver_remote=enabled,-Ddriver_remote=disabled,,"
|
|
PACKAGECONFIG[libvirtd] = "-Ddriver_libvirtd=enabled,-Ddriver_libvirtd=disabled,,"
|
|
PACKAGECONFIG[netcf] = "-Dnetcf=enabled,-Dnetcf=disabled,netcf,netcf"
|
|
PACKAGECONFIG[dtrace] = "-Ddtrace=enabled,-Ddtrace=disabled,,"
|
|
PACKAGECONFIG[udev] = "-Dudev=enabled -Dpciaccess=enabled,-Dudev=disabled,udev libpciaccess,"
|
|
PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,"
|
|
PACKAGECONFIG[python] = ",,python3,"
|
|
PACKAGECONFIG[sasl] = "-Dsasl=enabled,-Dsasl=disabled,cyrus-sasl,cyrus-sasl"
|
|
PACKAGECONFIG[numactl] = "-Dnumactl=enabled,-Dnumactl=disabled,numactl,"
|
|
PACKAGECONFIG[fuse] = "-Dfuse=enabled,-Dfuse=disabled,fuse3,"
|
|
PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit,"
|
|
PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng,"
|
|
PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil,"
|
|
PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=enabled, -Dapparmor_profiles=disabled,"
|
|
PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled,"
|
|
PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap"
|
|
PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled,"
|
|
|
|
# Enable the Python tool support
|
|
require libvirt-python.inc
|
|
|
|
do_compile() {
|
|
cd ${B}/src
|
|
# There may be race condition, but without creating these directories
|
|
# in the source tree, generation of files fails.
|
|
for i in access admin logging esx locking rpc hyperv lxc \
|
|
remote network storage interface nwfilter node_device \
|
|
secret vbox qemu; do
|
|
mkdir -p $i;
|
|
done
|
|
|
|
cd ${B}
|
|
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:"
|
|
ninja all
|
|
}
|
|
|
|
do_install:prepend() {
|
|
# so the install routines can find the libvirt.pc in the source dir
|
|
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:"
|
|
}
|
|
|
|
do_install:append() {
|
|
install -d ${D}/etc/init.d
|
|
install -d ${D}/etc/libvirt
|
|
install -d ${D}/etc/dnsmasq.d
|
|
install -d ${D}${nonarch_libdir}/sysusers.d/
|
|
|
|
install -m 0755 ${UNPACKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd
|
|
install -m 0644 ${UNPACKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf
|
|
install -m 0644 ${UNPACKDIR}/libvirt-qemu.conf ${D}${nonarch_libdir}/sysusers.d/libvirt-qemu.conf
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
|
|
# This will wind up in the libvirtd package, but will NOT be invoked by default.
|
|
#
|
|
mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d
|
|
fi
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
|
if [ "${systemd_system_unitdir}" != "${prefix}/lib/systemd/system" ] ; then
|
|
# ./src/meson.build: systemd_unit_dir = prefix / 'lib' / 'systemd' / 'system'
|
|
# ./tools/meson.build: install_dir: prefix / 'lib' / 'systemd' / 'system',
|
|
mkdir -p ${D}${systemd_system_unitdir}
|
|
mv ${D}${prefix}/lib/systemd/system/* ${D}${systemd_system_unitdir}
|
|
rmdir ${D}${prefix}/lib/systemd/system ${D}${prefix}/lib/systemd
|
|
fi
|
|
|
|
# We can't use 'notify' when we don't support 'sd_notify' dbus capabilities.
|
|
# Change default LIBVIRTD_ARGS to start libvirtd in the right mode.
|
|
sed -i -e 's/Type=notify/Type=forking/' \
|
|
-e '/Type=forking/a PIDFile=/run/libvirtd.pid' \
|
|
-e 's/\(Environment=LIBVIRTD_ARGS="--timeout 120"\)/#\1\nEnvironment=LIBVIRTD_ARGS="--listen --daemon"/' \
|
|
${D}/${systemd_system_unitdir}/libvirtd.service
|
|
fi
|
|
|
|
# The /run/libvirt directories created by the Makefile are
|
|
# wiped out in volatile, we need to create these at boot.
|
|
rm -rf ${D}/run
|
|
install -d ${D}${sysconfdir}/default/volatiles
|
|
echo "d root root 0755 /run/libvirt none" \
|
|
> ${D}${sysconfdir}/default/volatiles/99_libvirt
|
|
echo "d root root 0755 /run/libvirt/lockd none" \
|
|
>> ${D}${sysconfdir}/default/volatiles/99_libvirt
|
|
echo "d root root 0755 /run/libvirt/lxc none" \
|
|
>> ${D}${sysconfdir}/default/volatiles/99_libvirt
|
|
echo "d root root 0755 /run/libvirt/network none" \
|
|
>> ${D}${sysconfdir}/default/volatiles/99_libvirt
|
|
echo "d root root 0755 /run/libvirt/qemu none" \
|
|
>> ${D}${sysconfdir}/default/volatiles/99_libvirt
|
|
|
|
# disable seccomp_sandbox
|
|
if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then
|
|
sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
|
|
${D}${sysconfdir}/libvirt/qemu.conf
|
|
fi
|
|
|
|
# Add hook support for libvirt
|
|
mkdir -p ${D}/etc/libvirt/hooks
|
|
for hook in "daemon" "lxc" "network" "qemu"
|
|
do
|
|
install -m 0755 ${UNPACKDIR}/hook_support.py ${D}/etc/libvirt/hooks/${hook}
|
|
done
|
|
|
|
# Force the main dnsmasq instance to bind only to specified interfaces and
|
|
# to not bind to virbr0. Libvirt will run its own instance on this interface.
|
|
install -m 644 ${UNPACKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon
|
|
|
|
# remove .la references to our working diretory
|
|
for i in `find ${D}${libdir} -type f -name *.la`; do
|
|
sed -i -e 's#-L${B}/src/.libs##g' $i
|
|
done
|
|
|
|
sed -i -e 's/^\(unix_sock_group\ =\ \).*/\1"kvm"/' ${D}/etc/libvirt/libvirtd.conf
|
|
sed -i -e 's/^\(unix_sock_rw_perms\ =\ \).*/\1"0776"/' ${D}/etc/libvirt/libvirtd.conf
|
|
|
|
case ${MACHINE_ARCH} in
|
|
*mips*)
|
|
break
|
|
;;
|
|
*)
|
|
if ${@bb.utils.contains('PACKAGECONFIG', 'qemu', 'true', 'false', d)}; then
|
|
chown -R qemu:qemu ${D}/${localstatedir}/lib/libvirt/qemu
|
|
echo "d qemu qemu 0755 ${localstatedir}/cache/libvirt/qemu none" \
|
|
>> ${D}${sysconfdir}/default/volatiles/99_libvirt
|
|
break
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then
|
|
# Generate sample keys and certificates.
|
|
${UNPACKDIR}/${BP}/gnutls-helper.py -y
|
|
|
|
# Deploy all sample keys and certificates of CA, server and client
|
|
# to target so that libvirtd is able to boot successfully and local
|
|
# connection via 127.0.0.1 is available out of box.
|
|
install -d ${D}/etc/pki/CA
|
|
install -d ${D}/etc/pki/libvirt/private
|
|
install -m 0755 ${UNPACKDIR}/${BP}/gnutls-helper.py ${D}/${bindir}
|
|
install -m 0644 cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem
|
|
install -m 0644 cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem
|
|
install -m 0644 serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem
|
|
install -m 0644 servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem
|
|
install -m 0644 clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem
|
|
install -m 0644 clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem
|
|
|
|
# Force the connection to be tls.
|
|
sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf
|
|
fi
|
|
|
|
# virt-login-shell needs to run with setuid permission
|
|
chmod 4755 ${D}${bindir}/virt-login-shell
|
|
}
|
|
|
|
EXTRA_OEMESON += " \
|
|
-Dinit_script=${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','none', d)} \
|
|
-Drunstatedir=/run \
|
|
-Dtests=enabled \
|
|
"
|
|
|
|
# gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then
|
|
# crashes on target, so remove -Og and use -O2 as workaround
|
|
SELECTED_OPTIMIZATION:remove:virtclass-multilib-lib32:mipsarch = "-Og"
|
|
SELECTED_OPTIMIZATION:append:virtclass-multilib-lib32:mipsarch = " -O2"
|
|
|
|
pkg_postinst:${PN}() {
|
|
if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
|
|
/etc/init.d/populate-volatile.sh update
|
|
fi
|
|
mkdir -m 711 -p $D/data/images
|
|
}
|
|
|
|
python () {
|
|
if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
|
|
d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
|
|
}
|