2020-05-05 08:14:34 +00:00
|
|
|
src_inc_dir = include_directories('.')
|
|
|
|
|
|
|
|
src_dep = declare_dependency(
|
|
|
|
compile_args: [
|
|
|
|
'-DIN_LIBVIRT',
|
|
|
|
'-Dabs_top_builddir="@0@"'.format(meson.build_root()),
|
|
|
|
'-Dabs_top_srcdir="@0@"'.format(meson.source_root()),
|
|
|
|
] + coverage_flags + win32_flags,
|
|
|
|
dependencies: [
|
|
|
|
glib_dep,
|
|
|
|
libxml_dep,
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
libvirt_inc,
|
|
|
|
src_inc_dir,
|
|
|
|
top_inc_dir,
|
|
|
|
],
|
|
|
|
link_args: (
|
|
|
|
libvirt_relro
|
|
|
|
+ libvirt_no_indirect
|
|
|
|
+ coverage_flags
|
|
|
|
+ driver_modules_flags
|
|
|
|
+ win32_link_flags
|
|
|
|
),
|
|
|
|
)
|
2020-06-25 13:50:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
# define secdriver_dep
|
|
|
|
|
|
|
|
secdriver_dep = []
|
|
|
|
if conf.has('WITH_SECDRIVER_SELINUX')
|
|
|
|
secdriver_dep += selinux_dep
|
|
|
|
endif
|
|
|
|
if conf.has('WITH_SECDRIVER_APPARMOR')
|
|
|
|
secdriver_dep += apparmor_dep
|
|
|
|
endif
|
2020-07-27 06:16:48 +00:00
|
|
|
|
|
|
|
|
2020-06-25 13:41:34 +00:00
|
|
|
# Internal generic driver infrastructure
|
|
|
|
|
|
|
|
datatypes_sources = [
|
|
|
|
'datatypes.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2020-07-27 06:16:48 +00:00
|
|
|
# generate systemtap files
|
|
|
|
|
|
|
|
systemtap_dir = datadir / 'systemtap' / 'tapset'
|
|
|
|
|
|
|
|
dtrace_gen_headers = []
|
|
|
|
dtrace_gen_objects = []
|
|
|
|
|
|
|
|
if conf.has('WITH_DTRACE_PROBES')
|
|
|
|
infile = 'libvirt_probes.d'
|
|
|
|
out_h = 'libvirt_probes.h'
|
|
|
|
out_o = 'libvirt_probes.o'
|
|
|
|
out_stp = 'libvirt_probes.stp'
|
|
|
|
|
|
|
|
dtrace_gen_headers += custom_target(
|
|
|
|
out_h,
|
|
|
|
input: infile,
|
|
|
|
output: out_h,
|
|
|
|
command: [ dtrace_prog, '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ],
|
|
|
|
)
|
|
|
|
|
|
|
|
dtrace_gen_objects += custom_target(
|
|
|
|
out_o,
|
|
|
|
input: infile,
|
|
|
|
output: out_o,
|
|
|
|
command: [ dtrace_prog, '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ],
|
|
|
|
)
|
|
|
|
|
|
|
|
custom_target(
|
|
|
|
out_stp,
|
|
|
|
input: infile,
|
|
|
|
output: out_stp,
|
|
|
|
command: [
|
|
|
|
meson_python_prog, python3_prog.path(), dtrace2systemtap_prog.path(),
|
|
|
|
bindir, sbindir, libdir, '@INPUT@'
|
|
|
|
],
|
|
|
|
capture: true,
|
|
|
|
install: true,
|
|
|
|
install_dir: systemtap_dir,
|
|
|
|
)
|
|
|
|
endif
|
2020-07-27 06:17:48 +00:00
|
|
|
|
|
|
|
|
2020-07-27 06:35:58 +00:00
|
|
|
# symbol files
|
|
|
|
|
|
|
|
public_sym_file = 'libvirt_public.syms'
|
|
|
|
|
|
|
|
used_sym_files = [
|
|
|
|
'libvirt_private.syms',
|
|
|
|
'libvirt_driver_modules.syms',
|
|
|
|
]
|
|
|
|
|
|
|
|
generated_sym_files = []
|
|
|
|
|
|
|
|
sym_files = []
|
|
|
|
|
|
|
|
if host_machine.system() == 'linux'
|
|
|
|
used_sym_files += 'libvirt_linux.syms'
|
|
|
|
else
|
|
|
|
sym_files += 'libvirt_linux.syms'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.has('WITH_SASL')
|
|
|
|
used_sym_files += 'libvirt_sasl.syms'
|
|
|
|
else
|
|
|
|
sym_files += 'libvirt_sasl.syms'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.has('WITH_LIBSSH')
|
|
|
|
used_sym_files += 'libvirt_libssh.syms'
|
|
|
|
else
|
|
|
|
sym_files += 'libvirt_libssh.syms'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.has('WITH_SSH2')
|
|
|
|
used_sym_files += 'libvirt_libssh2.syms'
|
|
|
|
else
|
|
|
|
sym_files += 'libvirt_libssh2.syms'
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2020-07-27 06:39:38 +00:00
|
|
|
# variables filled by subdirectories
|
|
|
|
|
|
|
|
libvirt_libs = []
|
|
|
|
|
2020-06-25 13:42:06 +00:00
|
|
|
# virt_modules:
|
|
|
|
# each entry is a dictionary with following items:
|
|
|
|
# * name - module name (required)
|
|
|
|
# * sources - module sources (optional, default [])
|
|
|
|
# * name_prefix - resulting library prefix (optional, default 'lib')
|
|
|
|
# * include - include_directories (optional, default [])
|
|
|
|
# * deps - dependencies (optional, default [])
|
|
|
|
# * link_with - static libraries to link with (optional, default [])
|
|
|
|
# * link_whole - static libraries to include (optional, default [])
|
|
|
|
# * link_args - arguments for linker (optional, default [])
|
|
|
|
# * install_dir - installation directory (optional, default libdir / 'libvirt' / 'connection-driver'
|
|
|
|
virt_modules = []
|
|
|
|
|
2020-06-24 11:28:43 +00:00
|
|
|
# virt_daemons:
|
|
|
|
# each entry is a dictionary with following items:
|
|
|
|
# * name - binary name (required)
|
|
|
|
# * sources - binary sources (optional, default remote_daemon_sources)
|
|
|
|
# * c_args - compile arguments (optional, default [])
|
|
|
|
# * include = include_directories (optional, default [])
|
|
|
|
virt_daemons = []
|
|
|
|
|
2020-05-06 08:37:21 +00:00
|
|
|
# virt_helpers:
|
|
|
|
# each entry is a dictionary with following items:
|
|
|
|
# * name - binary name (required)
|
|
|
|
# * sources - binary sources (required)
|
|
|
|
# * c_args - compile arguments (optional, default [])
|
|
|
|
# * include - include_directories (optional, default [])
|
|
|
|
# * deps - dependencies (optional, default [])
|
|
|
|
# * install_dir - installation directory (optional, libexecdir)
|
|
|
|
virt_helpers = []
|
|
|
|
|
2020-07-27 06:51:29 +00:00
|
|
|
# virt_conf_files:
|
|
|
|
# libvirt conf files
|
|
|
|
virt_conf_files = []
|
|
|
|
|
|
|
|
# virt_aug_files:
|
|
|
|
# libvirt aug files
|
|
|
|
virt_aug_files = []
|
|
|
|
|
|
|
|
# virt_test_aug_files:
|
|
|
|
# generate libvirt augeas test files
|
|
|
|
# * name - augeas test file name (required)
|
|
|
|
# * aug - augeas test file source (required)
|
|
|
|
# * conf - conf file (required)
|
|
|
|
virt_test_aug_files = []
|
|
|
|
|
|
|
|
# virt_daemon_confs:
|
|
|
|
# generation libvirt daemon conf files
|
|
|
|
# each entry is a dictionary with following items:
|
|
|
|
# * name - daemon name (required)
|
|
|
|
# * with_ip - only for libvirtd and virtproxyd (optional, default false)
|
|
|
|
virt_daemon_confs = []
|
|
|
|
|
|
|
|
virt_aug_dir = datadir / 'augeas' / 'lenses'
|
|
|
|
virt_test_aug_dir = datadir / 'augeas' / 'lenses' / 'tests'
|
|
|
|
|
2020-07-27 07:03:25 +00:00
|
|
|
# guest_unit_files:
|
|
|
|
# guest unit files to install
|
|
|
|
guest_unit_files = []
|
|
|
|
|
|
|
|
# virt_daemon_units:
|
|
|
|
# generate libvirt daemon systemd unit files
|
|
|
|
# * service - name of the service (required)
|
|
|
|
# * service_in - service source file (required)
|
|
|
|
# * name - socket description (required)
|
|
|
|
# * sockprefix - socket prefix name (required)
|
|
|
|
# * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ])
|
|
|
|
# * socket_$name_in - additional socket source files (optional, default remote/libvirtd.socket.in )
|
|
|
|
# * deps - socket dependencies (optional, default '')
|
|
|
|
# * conflicts - if the service conflicts with libvirtd (optional, true)
|
|
|
|
virt_daemon_units = []
|
|
|
|
|
2020-07-28 10:11:31 +00:00
|
|
|
# openrc_init_files
|
|
|
|
# generate libvirt daemon openrc init files
|
|
|
|
# * name - daemon name (required)
|
|
|
|
# * in_file - source init file (required)
|
|
|
|
openrc_init_files = []
|
|
|
|
|
2020-06-25 15:46:33 +00:00
|
|
|
# sysconf_files
|
|
|
|
# install libvirt daemon sysconf files
|
|
|
|
# * name - daemon name (required)
|
|
|
|
# * file - source sysconf file (required)
|
|
|
|
sysconf_files = []
|
|
|
|
|
2020-07-23 10:41:32 +00:00
|
|
|
# virt_install_dirs:
|
|
|
|
# list of directories to create during installation
|
|
|
|
virt_install_dirs = []
|
|
|
|
|
2020-07-27 07:10:31 +00:00
|
|
|
# driver_source_files:
|
|
|
|
# driver source files to check
|
|
|
|
driver_source_files = []
|
|
|
|
|
2020-07-27 06:39:38 +00:00
|
|
|
|
2020-07-27 06:17:48 +00:00
|
|
|
# list subdirectories
|
|
|
|
|
2020-06-17 23:07:25 +00:00
|
|
|
subdir('cpu_map')
|
|
|
|
|
2020-07-27 06:17:48 +00:00
|
|
|
subdir('util')
|
|
|
|
|
|
|
|
src_dep = declare_dependency(
|
|
|
|
dependencies: [ src_dep ],
|
|
|
|
include_directories: [ util_inc_dir ],
|
|
|
|
)
|
2020-04-30 17:33:38 +00:00
|
|
|
|
|
|
|
subdir('conf')
|
2020-07-27 09:06:06 +00:00
|
|
|
subdir('rpc')
|
2020-06-17 22:57:13 +00:00
|
|
|
subdir('access')
|
2020-05-18 13:01:32 +00:00
|
|
|
subdir('cpu')
|
2020-07-27 06:22:41 +00:00
|
|
|
|
2020-03-11 13:44:58 +00:00
|
|
|
subdir('hypervisor')
|
2020-06-17 22:58:52 +00:00
|
|
|
subdir('vmx')
|
|
|
|
|
2020-07-27 06:26:42 +00:00
|
|
|
subdir('remote')
|
|
|
|
|
2020-07-27 06:22:41 +00:00
|
|
|
subdir('admin')
|
2020-03-26 11:44:56 +00:00
|
|
|
subdir('interface')
|
2020-06-17 23:00:56 +00:00
|
|
|
subdir('locking')
|
2020-03-13 10:25:23 +00:00
|
|
|
subdir('logging')
|
2020-06-17 23:10:22 +00:00
|
|
|
subdir('network')
|
2020-06-24 10:36:02 +00:00
|
|
|
subdir('node_device')
|
2020-06-24 10:39:04 +00:00
|
|
|
subdir('nwfilter')
|
2020-06-17 23:14:10 +00:00
|
|
|
subdir('secret')
|
2020-07-27 06:27:28 +00:00
|
|
|
subdir('security')
|
2020-06-17 23:12:59 +00:00
|
|
|
subdir('storage')
|
2020-06-17 22:59:17 +00:00
|
|
|
|
2020-06-17 23:09:06 +00:00
|
|
|
subdir('bhyve')
|
2020-07-27 06:23:40 +00:00
|
|
|
subdir('esx')
|
2020-07-27 06:24:55 +00:00
|
|
|
subdir('hyperv')
|
2020-05-05 08:17:52 +00:00
|
|
|
subdir('libxl')
|
2020-06-17 23:09:50 +00:00
|
|
|
subdir('lxc')
|
2020-06-17 23:00:10 +00:00
|
|
|
subdir('openvz')
|
2020-07-27 06:43:24 +00:00
|
|
|
subdir('qemu')
|
2020-06-17 23:00:22 +00:00
|
|
|
subdir('test')
|
2020-06-17 23:13:46 +00:00
|
|
|
subdir('vbox')
|
2020-06-17 22:59:17 +00:00
|
|
|
subdir('vmware')
|
2020-03-24 14:48:36 +00:00
|
|
|
subdir('vz')
|
2020-06-17 23:03:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
driver_sources = [
|
|
|
|
'driver.c',
|
|
|
|
'libvirt.c',
|
|
|
|
'libvirt-domain.c',
|
|
|
|
'libvirt-domain-checkpoint.c',
|
|
|
|
'libvirt-domain-snapshot.c',
|
|
|
|
'libvirt-host.c',
|
|
|
|
'libvirt-interface.c',
|
|
|
|
'libvirt-network.c',
|
|
|
|
'libvirt-nodedev.c',
|
|
|
|
'libvirt-nwfilter.c',
|
|
|
|
'libvirt-secret.c',
|
|
|
|
'libvirt-storage.c',
|
|
|
|
'libvirt-stream.c',
|
|
|
|
]
|
|
|
|
|
2020-05-18 09:35:45 +00:00
|
|
|
driver_headers = [
|
|
|
|
'driver-hypervisor.h',
|
|
|
|
'driver-interface.h',
|
|
|
|
'driver-network.h',
|
|
|
|
'driver-nodedev.h',
|
|
|
|
'driver-nwfilter.h',
|
|
|
|
'driver-secret.h',
|
|
|
|
'driver-state.h',
|
|
|
|
'driver-storage.h',
|
|
|
|
'driver-stream.h',
|
|
|
|
]
|
|
|
|
|
2020-06-17 23:03:24 +00:00
|
|
|
driver_lib = static_library(
|
|
|
|
'virt_driver',
|
|
|
|
[
|
|
|
|
driver_sources,
|
|
|
|
datatypes_sources,
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
curl_dep,
|
|
|
|
dlopen_dep,
|
|
|
|
gnutls_dep,
|
|
|
|
rpc_dep,
|
|
|
|
src_dep,
|
|
|
|
xdr_dep,
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
conf_inc_dir,
|
|
|
|
],
|
|
|
|
)
|
2020-07-27 06:35:58 +00:00
|
|
|
|
2020-07-27 06:39:38 +00:00
|
|
|
libvirt_libs += driver_lib
|
|
|
|
|
2020-07-27 06:35:58 +00:00
|
|
|
|
|
|
|
# symbol files for libvirt.so
|
|
|
|
|
|
|
|
# Build our version script. This is composed of three parts:
|
|
|
|
#
|
|
|
|
# 1. libvirt_public.syms - public API. These functions are always
|
|
|
|
# present in the library and should never change incompatibly.
|
|
|
|
#
|
|
|
|
# 2. libvirt_private.syms - private API. These symbols are private and
|
|
|
|
# semantics may change on every release, hence the version number is
|
|
|
|
# spliced in at build time. This ensures that if libvirtd, virsh, or a
|
|
|
|
# driver module was built against one libvirt release, it will refuse to
|
|
|
|
# load with another where symbols may have same names but different
|
|
|
|
# semantics. Such symbols should never be visible in an (installed)
|
|
|
|
# public header file.
|
|
|
|
#
|
|
|
|
# 3. libvirt_*.syms - dynamic private API. Like libvirt_private.syms,
|
|
|
|
# except that build options (such as --enable-debug) can mean these
|
|
|
|
# symbols aren't present at all.
|
|
|
|
|
|
|
|
libvirt_syms = custom_target(
|
|
|
|
'libvirt.syms',
|
|
|
|
input: [ public_sym_file ] + used_sym_files + generated_sym_files,
|
|
|
|
output: 'libvirt.syms',
|
|
|
|
command: [
|
|
|
|
meson_python_prog, python3_prog.path(), meson_gen_sym_prog.path(),
|
|
|
|
'@OUTPUT@', 'LIBVIRT_PRIVATE_' + meson.project_version(), '@INPUT@',
|
|
|
|
],
|
|
|
|
)
|
2020-07-27 06:39:38 +00:00
|
|
|
libvirt_syms_file = libvirt_syms
|
2020-07-27 06:35:58 +00:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
libvirt_def = custom_target(
|
|
|
|
'libvirt.def',
|
|
|
|
input: libvirt_syms,
|
|
|
|
output: 'libvirt.def',
|
|
|
|
command: [
|
|
|
|
meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(),
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
)
|
2020-07-27 06:39:38 +00:00
|
|
|
libvirt_syms_file = libvirt_def
|
2020-07-27 06:35:58 +00:00
|
|
|
endif
|
2020-07-27 06:39:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
# libvirt.so library
|
|
|
|
|
|
|
|
libvirt_syms_flags = '@0@@1@'.format(
|
|
|
|
version_script_flags,
|
|
|
|
libvirt_syms_file.full_path(),
|
|
|
|
)
|
|
|
|
|
|
|
|
libvirt_lib = shared_library(
|
|
|
|
'virt',
|
|
|
|
dtrace_gen_objects,
|
|
|
|
dependencies: [
|
|
|
|
src_dep,
|
|
|
|
],
|
|
|
|
link_args: [
|
|
|
|
libvirt_flat_namespace,
|
|
|
|
libvirt_no_undefined,
|
|
|
|
libvirt_nodelete,
|
|
|
|
libvirt_syms_flags,
|
|
|
|
],
|
|
|
|
link_whole: [
|
|
|
|
libvirt_libs,
|
|
|
|
],
|
|
|
|
link_depends: [
|
|
|
|
libvirt_syms_file,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
version: libvirt_lib_version,
|
|
|
|
soversion: libvirt_so_version,
|
|
|
|
)
|
2020-06-17 23:07:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
# libvirt-qemu.syms symbol files
|
|
|
|
|
|
|
|
libvirt_qemu_syms = meson.current_source_dir() / 'libvirt_qemu.syms'
|
|
|
|
libvirt_qemu_syms_file = libvirt_qemu_syms
|
|
|
|
libvirt_qemu_syms_path = libvirt_qemu_syms
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
libvirt_qemu_def = custom_target(
|
|
|
|
'libvirt_qemu.def',
|
|
|
|
input: libvirt_qemu_syms,
|
|
|
|
output: 'libvirt_qemu.def',
|
|
|
|
command: [
|
|
|
|
meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(),
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
libvirt_qemu_syms_file = libvirt_qemu_def
|
|
|
|
libvirt_qemu_syms_path = libvirt_qemu_def.full_path()
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# libvirt-qemu.so
|
|
|
|
|
|
|
|
libvirt_qemu_syms_flags = '@0@@1@'.format(
|
|
|
|
version_script_flags,
|
|
|
|
libvirt_qemu_syms_path,
|
|
|
|
)
|
|
|
|
|
|
|
|
libvirt_qemu_lib = shared_library(
|
|
|
|
'virt-qemu',
|
|
|
|
'libvirt-qemu.c',
|
|
|
|
dependencies: [
|
|
|
|
src_dep,
|
|
|
|
],
|
|
|
|
link_args: [
|
|
|
|
libvirt_nodelete,
|
|
|
|
libvirt_qemu_syms_flags,
|
|
|
|
],
|
|
|
|
link_with: [
|
|
|
|
libvirt_lib,
|
|
|
|
],
|
|
|
|
link_depends: [
|
|
|
|
libvirt_qemu_syms_file,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_rpath: libdir,
|
|
|
|
version: libvirt_lib_version,
|
|
|
|
soversion: libvirt_so_version,
|
|
|
|
)
|
2020-06-25 14:30:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
# libvirt-lxc.so symbol files
|
|
|
|
|
|
|
|
libvirt_lxc_syms = meson.current_source_dir() / 'libvirt_lxc.syms'
|
|
|
|
libvirt_lxc_syms_file = libvirt_lxc_syms
|
|
|
|
libvirt_lxc_syms_path = libvirt_lxc_syms
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
libvirt_lxc_def = custom_target(
|
|
|
|
'libvirt_lxc.def',
|
|
|
|
input: libvirt_lxc_syms,
|
|
|
|
output: 'libvirt_lxc.def',
|
|
|
|
command: [
|
|
|
|
meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(),
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
libvirt_lxc_syms_file = libvirt_lxc_def
|
|
|
|
libvirt_lxc_syms_path = libvirt_lxc_def.full_path()
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# libvirt-lxc.so
|
|
|
|
|
|
|
|
libvirt_lxc_syms_flags = '@0@@1@'.format(
|
|
|
|
version_script_flags,
|
|
|
|
libvirt_lxc_syms_path,
|
|
|
|
)
|
|
|
|
|
|
|
|
libvirt_lxc_lib = shared_library(
|
|
|
|
'virt-lxc',
|
|
|
|
'libvirt-lxc.c',
|
|
|
|
dependencies: [
|
|
|
|
apparmor_dep,
|
|
|
|
selinux_dep,
|
|
|
|
src_dep,
|
|
|
|
],
|
|
|
|
link_args: [
|
|
|
|
libvirt_nodelete,
|
|
|
|
libvirt_lxc_syms_flags,
|
|
|
|
],
|
|
|
|
link_with: [
|
|
|
|
libvirt_lib,
|
|
|
|
],
|
|
|
|
link_depends: [
|
|
|
|
libvirt_lxc_syms_file,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_rpath: libdir,
|
|
|
|
version: libvirt_lib_version,
|
|
|
|
soversion: libvirt_so_version,
|
|
|
|
)
|
2020-07-27 06:41:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
# libvirt-admin.so
|
|
|
|
|
|
|
|
libvirt_admin_lib = shared_library(
|
|
|
|
'virt-admin',
|
|
|
|
[
|
|
|
|
admin_sources,
|
|
|
|
admin_client_generated,
|
|
|
|
admin_driver_generated,
|
|
|
|
datatypes_sources,
|
|
|
|
dtrace_gen_objects,
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
capng_dep,
|
|
|
|
devmapper_dep,
|
|
|
|
gnutls_dep,
|
|
|
|
libssh2_dep,
|
|
|
|
libssh_dep,
|
|
|
|
sasl_dep,
|
|
|
|
src_dep,
|
|
|
|
rpc_dep,
|
|
|
|
xdr_dep,
|
|
|
|
yajl_dep,
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
admin_inc_dir,
|
|
|
|
remote_inc_dir,
|
|
|
|
],
|
|
|
|
link_args: [
|
|
|
|
libvirt_admin_syms_flags,
|
|
|
|
libvirt_nodelete,
|
|
|
|
],
|
|
|
|
link_with: [
|
|
|
|
libvirt_lib,
|
|
|
|
],
|
|
|
|
link_depends: [
|
|
|
|
libvirt_admin_syms_file,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_rpath: libdir,
|
|
|
|
version: libvirt_lib_version,
|
|
|
|
soversion: libvirt_so_version,
|
|
|
|
)
|
2020-06-25 13:42:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
# build libvirt shared modules
|
|
|
|
|
|
|
|
foreach module : virt_modules
|
|
|
|
mod = shared_module(
|
|
|
|
module['name'],
|
|
|
|
module.get('sources', []),
|
|
|
|
name_prefix: module.get('name_prefix', 'lib'),
|
|
|
|
include_directories: [
|
|
|
|
conf_inc_dir,
|
|
|
|
module.get('include', []),
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
src_dep,
|
|
|
|
module.get('deps', []),
|
|
|
|
],
|
|
|
|
link_with: [
|
|
|
|
libvirt_lib,
|
|
|
|
module.get('link_with', []),
|
|
|
|
],
|
|
|
|
link_whole: [
|
|
|
|
module.get('link_whole', []),
|
|
|
|
],
|
|
|
|
link_args: [
|
|
|
|
libvirt_nodelete,
|
|
|
|
module.get('link_args', []),
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_dir: module.get('install_dir', libdir / 'libvirt' / 'connection-driver'),
|
|
|
|
install_rpath: libdir,
|
|
|
|
)
|
|
|
|
set_variable('@0@_module'.format(module['name'].underscorify()), mod)
|
|
|
|
endforeach
|
2020-06-24 11:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
# build libvirt daemons
|
|
|
|
|
|
|
|
foreach daemon : virt_daemons
|
|
|
|
bin = executable(
|
|
|
|
daemon['name'],
|
|
|
|
[
|
|
|
|
daemon.get('sources', [ remote_daemon_sources, remote_daemon_generated ]),
|
|
|
|
dtrace_gen_objects,
|
|
|
|
],
|
|
|
|
c_args: [
|
|
|
|
daemon.get('c_args', []),
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
conf_inc_dir,
|
|
|
|
remote_inc_dir,
|
|
|
|
daemon.get('include', []),
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
admin_dep,
|
|
|
|
access_dep,
|
|
|
|
dbus_dep,
|
|
|
|
gnutls_dep,
|
|
|
|
libnl_dep,
|
|
|
|
rpc_dep,
|
|
|
|
src_dep,
|
|
|
|
sasl_dep,
|
|
|
|
xdr_dep,
|
|
|
|
],
|
|
|
|
link_with: [
|
|
|
|
admin_driver_lib,
|
|
|
|
libvirt_lib,
|
|
|
|
libvirt_lxc_lib,
|
|
|
|
libvirt_qemu_lib,
|
|
|
|
],
|
|
|
|
link_args: [
|
|
|
|
libvirt_no_undefined,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_dir: sbindir,
|
|
|
|
install_rpath: libdir,
|
|
|
|
)
|
|
|
|
endforeach
|
2020-05-06 08:37:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
# build libvirt helpers
|
|
|
|
|
|
|
|
foreach helper : virt_helpers
|
|
|
|
bin = executable(
|
|
|
|
helper['name'],
|
|
|
|
[
|
|
|
|
helper['sources'],
|
|
|
|
],
|
|
|
|
c_args: [
|
|
|
|
helper.get('c_args', []),
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
helper.get('include', []),
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
src_dep,
|
|
|
|
helper.get('deps', []),
|
|
|
|
],
|
|
|
|
link_with: [
|
|
|
|
libvirt_lib,
|
|
|
|
],
|
|
|
|
install: true,
|
|
|
|
install_dir: helper.get('install_dir', libexecdir),
|
|
|
|
install_rpath: libdir,
|
|
|
|
)
|
|
|
|
endforeach
|
2020-07-27 06:51:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Generate daemon config, augeas and augeas test files
|
|
|
|
|
2020-07-27 06:52:17 +00:00
|
|
|
virt_conf_files += 'libvirt.conf'
|
|
|
|
|
2020-07-27 06:51:29 +00:00
|
|
|
install_data(virt_conf_files, install_dir: confdir)
|
|
|
|
install_data(virt_aug_files, install_dir: virt_aug_dir)
|
|
|
|
|
|
|
|
foreach data : virt_test_aug_files
|
|
|
|
custom_target(
|
|
|
|
data['name'],
|
|
|
|
input: [ data['conf'], data['aug'] ],
|
|
|
|
output: data['name'],
|
|
|
|
command: [
|
|
|
|
meson_python_prog, python3_prog.path(), augeas_gentest_prog.path(),
|
|
|
|
'@INPUT@',
|
|
|
|
],
|
|
|
|
capture: true,
|
|
|
|
install: true,
|
|
|
|
install_dir: virt_test_aug_dir,
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
foreach data : virt_daemon_confs
|
|
|
|
capitalize_args = [ '-c', 'print("@0@".capitalize())'.format(data['name']) ]
|
|
|
|
name_uc = run_command(python3_prog, capitalize_args, check: true).stdout().strip()
|
|
|
|
daemon_conf = configuration_data()
|
|
|
|
daemon_conf.set('runstatedir', runstatedir)
|
|
|
|
daemon_conf.set('sbindir', sbindir)
|
|
|
|
daemon_conf.set('sysconfdir', sysconfdir)
|
|
|
|
daemon_conf.set('DAEMON_NAME', data['name'])
|
|
|
|
daemon_conf.set('DAEMON_NAME_UC', name_uc)
|
|
|
|
# to silence meson warning about missing 'CONFIG' in the configuration_data
|
|
|
|
daemon_conf.set('CONFIG', '@CONFIG@')
|
|
|
|
|
|
|
|
if data.get('with_ip', false)
|
|
|
|
conf_in = libvirtd_conf_tmp
|
|
|
|
else
|
|
|
|
conf_in = virtd_conf_tmp
|
|
|
|
endif
|
|
|
|
conf_out = configure_file(
|
|
|
|
input: conf_in,
|
|
|
|
output: '@0@.conf'.format(data['name']),
|
|
|
|
configuration: daemon_conf,
|
|
|
|
install: true,
|
|
|
|
install_dir: confdir,
|
|
|
|
)
|
|
|
|
|
|
|
|
if data.get('with_ip', false)
|
|
|
|
aug_in = libvirtd_aug_tmp
|
|
|
|
else
|
|
|
|
aug_in = virtd_aug_tmp
|
|
|
|
endif
|
|
|
|
configure_file(
|
|
|
|
input: aug_in,
|
|
|
|
output: '@0@.aug'.format(data['name']),
|
|
|
|
configuration: daemon_conf,
|
|
|
|
install: true,
|
|
|
|
install_dir: virt_aug_dir,
|
|
|
|
)
|
|
|
|
|
|
|
|
if data.get('with_ip', false)
|
|
|
|
test_aug_in = test_libvirtd_aug_tmp
|
|
|
|
else
|
|
|
|
test_aug_in = test_virtd_aug_tmp
|
|
|
|
endif
|
|
|
|
test_aug_tmp = configure_file(
|
|
|
|
input: test_aug_in,
|
|
|
|
output: 'test_@0@.aug.tmp'.format(data['name']),
|
|
|
|
configuration: daemon_conf,
|
|
|
|
)
|
|
|
|
|
|
|
|
test_aug_out = 'test_@0@.aug'.format(data['name'])
|
|
|
|
custom_target(
|
|
|
|
test_aug_out,
|
|
|
|
input: [ conf_out, test_aug_tmp ],
|
|
|
|
output: test_aug_out,
|
|
|
|
command: [
|
|
|
|
meson_python_prog, python3_prog.path(), augeas_gentest_prog.path(),
|
|
|
|
'@INPUT@',
|
|
|
|
],
|
|
|
|
capture: true,
|
|
|
|
install: true,
|
|
|
|
install_dir: virt_test_aug_dir,
|
|
|
|
)
|
|
|
|
endforeach
|
2020-07-27 07:03:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
if conf.has('WITH_LIBVIRTD')
|
|
|
|
# Generate systemd service and socket unit files
|
|
|
|
if init_script == 'systemd'
|
|
|
|
systemd_unit_dir = prefix / 'lib' / 'systemd' / 'system'
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
guest_unit_files,
|
|
|
|
install_dir: systemd_unit_dir,
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach unit : virt_daemon_units
|
|
|
|
unit_conf = configuration_data()
|
|
|
|
unit_conf.set('runstatedir', runstatedir)
|
|
|
|
unit_conf.set('sbindir', sbindir)
|
|
|
|
unit_conf.set('sysconfdir', sysconfdir)
|
|
|
|
unit_conf.set('name', unit['name'])
|
|
|
|
unit_conf.set('service', unit['service'])
|
|
|
|
unit_conf.set('sockprefix', unit['sockprefix'])
|
|
|
|
unit_conf.set('deps', unit.get('deps', ''))
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input: unit['service_in'],
|
|
|
|
output: '@0@.service'.format(unit['service']),
|
|
|
|
configuration: unit_conf,
|
|
|
|
install: true,
|
|
|
|
install_dir: systemd_unit_dir,
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach socket : unit.get('sockets', [ 'main', 'ro', 'admin' ])
|
|
|
|
if socket == 'main'
|
|
|
|
socket_in_def = 'remote' / 'libvirtd.socket.in'
|
|
|
|
socket_in = unit.get('socket_in', socket_in_def)
|
|
|
|
socket_out = '@0@.socket'.format(unit['service'])
|
|
|
|
else
|
|
|
|
socket_in_def = 'remote' / 'libvirtd-@0@.socket.in'.format(socket)
|
|
|
|
socket_in = unit.get('socket_@0@_in'.format(socket), socket_in_def)
|
|
|
|
socket_out = '@0@-@1@.socket'.format(unit['service'], socket)
|
|
|
|
endif
|
|
|
|
configure_file(
|
|
|
|
input: socket_in,
|
|
|
|
output: socket_out,
|
|
|
|
configuration: unit_conf,
|
|
|
|
install: true,
|
|
|
|
install_dir: systemd_unit_dir,
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
endforeach
|
|
|
|
endif
|
2020-07-28 10:11:31 +00:00
|
|
|
|
|
|
|
# Generate openrc init files
|
|
|
|
if init_script == 'openrc'
|
|
|
|
foreach init : openrc_init_files
|
|
|
|
init_conf = configuration_data()
|
|
|
|
init_conf.set('sbindir', sbindir)
|
|
|
|
init_conf.set('runstatedir', runstatedir)
|
|
|
|
if conf.has('WITH_FIREWALLD')
|
|
|
|
need_firewalld = 'need firewalld'
|
|
|
|
else
|
|
|
|
need_firewalld = ''
|
|
|
|
endif
|
|
|
|
init_conf.set('NEED_FIREWALLD', need_firewalld)
|
|
|
|
|
|
|
|
init_file = configure_file(
|
|
|
|
input: init['in_file'],
|
|
|
|
output: '@0@.init'.format(init['name']),
|
|
|
|
configuration: init_conf,
|
|
|
|
)
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
init_file,
|
|
|
|
install_dir: sysconfdir / 'init.d',
|
|
|
|
rename: [ init['name'] ],
|
|
|
|
)
|
|
|
|
|
|
|
|
if init.has_key('confd')
|
|
|
|
install_data(
|
|
|
|
init['confd'],
|
|
|
|
install_dir: sysconfdir / 'conf.d',
|
|
|
|
rename: [ init['name'] ],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
endif
|
2020-07-27 07:03:25 +00:00
|
|
|
endif
|
2020-06-25 15:46:33 +00:00
|
|
|
|
|
|
|
foreach sysconf : sysconf_files
|
|
|
|
install_data(
|
|
|
|
sysconf['file'],
|
|
|
|
install_dir: sysconfdir / 'sysconfig',
|
|
|
|
rename: [ sysconf['name'] ],
|
|
|
|
)
|
|
|
|
endforeach
|
2020-07-23 10:41:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Install empty directories
|
|
|
|
|
|
|
|
virt_install_dirs += [
|
|
|
|
localstatedir / 'cache' / 'libvirt',
|
|
|
|
localstatedir / 'lib' / 'libvirt' / 'images',
|
|
|
|
localstatedir / 'lib' / 'libvirt' / 'filesystems',
|
|
|
|
localstatedir / 'lib' / 'libvirt' / 'boot',
|
|
|
|
]
|
|
|
|
|
|
|
|
meson.add_install_script(
|
|
|
|
meson_python_prog.path(), python3_prog.path(), meson_install_dirs_prog.path(),
|
|
|
|
virt_install_dirs,
|
|
|
|
)
|
2020-07-27 07:09:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Check driver files
|
|
|
|
|
|
|
|
if host_machine.system() == 'linux'
|
|
|
|
test(
|
|
|
|
'check-symfile',
|
|
|
|
python3_prog,
|
|
|
|
args: [ check_symfile_prog.path(), libvirt_syms, libvirt_lib ],
|
|
|
|
env: runutf8,
|
|
|
|
)
|
|
|
|
endif
|
2020-06-25 15:33:32 +00:00
|
|
|
|
|
|
|
test(
|
|
|
|
'check-symsorting',
|
|
|
|
python3_prog,
|
|
|
|
args: [
|
|
|
|
check_symsorting_prog.path(),
|
|
|
|
meson.current_source_dir(),
|
|
|
|
files(sym_files, used_sym_files),
|
|
|
|
],
|
|
|
|
env: runutf8,
|
|
|
|
)
|
2020-05-18 09:35:45 +00:00
|
|
|
|
|
|
|
test(
|
|
|
|
'check-drivername',
|
|
|
|
python3_prog,
|
|
|
|
args: [
|
|
|
|
check_drivername_prog.path(), files(driver_headers),
|
|
|
|
files('libvirt_public.syms'), libvirt_qemu_syms, libvirt_lxc_syms,
|
|
|
|
],
|
|
|
|
env: runutf8,
|
|
|
|
)
|
2020-07-27 07:10:31 +00:00
|
|
|
|
|
|
|
test(
|
|
|
|
'check-driverimpls',
|
|
|
|
python3_prog,
|
|
|
|
args: [ check_driverimpls_prog.path(), driver_source_files ],
|
|
|
|
env: runutf8,
|
|
|
|
)
|