2020-03-13 10:25:23 +00:00
|
|
|
log_driver_sources = [
|
|
|
|
'log_manager.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
log_protocol = 'log_protocol.x'
|
|
|
|
|
|
|
|
log_protocol_generated = []
|
|
|
|
|
2020-07-27 06:43:24 +00:00
|
|
|
log_protocol_header_generated = custom_target(
|
2020-03-13 10:25:23 +00:00
|
|
|
'log_protocol.h',
|
|
|
|
input: log_protocol,
|
|
|
|
output: 'log_protocol.h',
|
|
|
|
command: [
|
|
|
|
genprotocol_prog, rpcgen_prog, '-h', '@INPUT@', '@OUTPUT@'
|
|
|
|
],
|
|
|
|
)
|
2020-07-27 06:43:24 +00:00
|
|
|
log_protocol_generated += log_protocol_header_generated
|
2020-03-13 10:25:23 +00:00
|
|
|
|
|
|
|
log_protocol_generated += custom_target(
|
|
|
|
'log_protocol.c',
|
|
|
|
input: log_protocol,
|
|
|
|
output: 'log_protocol.c',
|
|
|
|
command: [
|
|
|
|
genprotocol_prog, rpcgen_prog, '-c', '@INPUT@', '@OUTPUT@'
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-07-27 06:46:16 +00:00
|
|
|
log_daemon_sources = files(
|
|
|
|
'log_daemon.c',
|
|
|
|
'log_daemon_config.c',
|
|
|
|
'log_daemon_dispatch.c',
|
|
|
|
'log_handler.c',
|
|
|
|
)
|
|
|
|
|
2020-03-13 10:25:23 +00:00
|
|
|
log_driver_lib = static_library(
|
|
|
|
'virt_log_driver',
|
|
|
|
[
|
|
|
|
log_driver_sources,
|
|
|
|
log_protocol_generated,
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
rpc_dep,
|
|
|
|
src_dep,
|
|
|
|
xdr_dep,
|
|
|
|
],
|
|
|
|
)
|
2020-07-27 06:39:38 +00:00
|
|
|
|
|
|
|
libvirt_libs += log_driver_lib
|
2020-07-27 06:43:24 +00:00
|
|
|
|
2020-07-27 06:46:16 +00:00
|
|
|
if conf.has('WITH_LIBVIRTD')
|
|
|
|
log_daemon_generated = custom_target(
|
|
|
|
'log_daemon_dispatch_stubs.h',
|
|
|
|
input: log_protocol,
|
|
|
|
output: 'log_daemon_dispatch_stubs.h',
|
|
|
|
command: [
|
|
|
|
gendispatch_prog, '--mode=server',
|
|
|
|
'virLogManagerProtocol', 'VIR_LOG_MANAGER_PROTOCOL', '@INPUT@',
|
|
|
|
],
|
|
|
|
capture: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
virt_daemons += {
|
|
|
|
'name': 'virtlogd',
|
|
|
|
'sources': [
|
|
|
|
log_daemon_sources,
|
|
|
|
log_daemon_generated,
|
|
|
|
log_protocol_generated,
|
|
|
|
],
|
|
|
|
'include': [
|
|
|
|
include_directories('.'),
|
|
|
|
],
|
|
|
|
}
|
2020-07-27 06:52:17 +00:00
|
|
|
|
|
|
|
virt_conf_files += files('virtlogd.conf')
|
|
|
|
virt_aug_files += files('virtlogd.aug')
|
2020-06-22 16:04:48 +00:00
|
|
|
virt_test_aug_files += {
|
|
|
|
'name': 'test_virtlogd.aug',
|
|
|
|
'aug': files('test_virtlogd.aug.in'),
|
|
|
|
'conf': files('virtlogd.conf'),
|
2020-08-18 13:38:34 +00:00
|
|
|
'test_name': 'virtlogd',
|
|
|
|
'test_srcdir': meson.current_source_dir(),
|
|
|
|
'test_builddir': meson.current_build_dir(),
|
2020-06-22 16:04:48 +00:00
|
|
|
}
|
2020-07-27 07:03:25 +00:00
|
|
|
|
|
|
|
virt_daemon_units += {
|
|
|
|
'service': 'virtlogd',
|
|
|
|
'service_in': files('virtlogd.service.in'),
|
|
|
|
'name': '',
|
|
|
|
'sockprefix': '',
|
|
|
|
'sockets': [ 'main', 'admin' ],
|
|
|
|
'socket_in': files('virtlogd.socket.in'),
|
|
|
|
'socket_admin_in': files('virtlogd-admin.socket.in'),
|
|
|
|
}
|
2020-07-28 10:11:31 +00:00
|
|
|
|
|
|
|
openrc_init_files += {
|
|
|
|
'name': 'virtlogd',
|
|
|
|
'in_file': files('virtlogd.init.in'),
|
|
|
|
}
|
2020-06-25 15:46:33 +00:00
|
|
|
|
|
|
|
sysconf_files += {
|
|
|
|
'name': 'virtlogd',
|
|
|
|
'file': files('virtlogd.sysconf'),
|
|
|
|
}
|
2020-07-27 06:46:16 +00:00
|
|
|
endif
|
|
|
|
|
2020-07-27 06:43:24 +00:00
|
|
|
log_inc_dir = include_directories('.')
|
|
|
|
|
|
|
|
log_dep = declare_dependency(
|
|
|
|
include_directories: log_inc_dir,
|
|
|
|
sources: log_protocol_header_generated,
|
|
|
|
)
|