2020-06-17 23:09:25 +00:00
|
|
|
lock_protocol = 'lock_protocol.x'
|
|
|
|
|
2020-06-17 23:00:56 +00:00
|
|
|
lock_driver_sources = [
|
|
|
|
'lock_manager.c',
|
|
|
|
'lock_driver_nop.c',
|
|
|
|
'domain_lock.c',
|
|
|
|
]
|
|
|
|
|
2020-06-17 23:09:25 +00:00
|
|
|
lock_driver_lockd_sources = [
|
|
|
|
'lock_driver_lockd.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
lock_protocol_generated = []
|
|
|
|
|
|
|
|
lock_protocol_generated += custom_target(
|
|
|
|
'lock_protocol.h',
|
|
|
|
input: lock_protocol,
|
|
|
|
output: 'lock_protocol.h',
|
|
|
|
command: [
|
|
|
|
genprotocol_prog, rpcgen_prog, '-h', '@INPUT@', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
lock_protocol_generated += custom_target(
|
|
|
|
'lock_protocol.c',
|
|
|
|
input: lock_protocol,
|
|
|
|
output: 'lock_protocol.c',
|
|
|
|
command: [
|
|
|
|
genprotocol_prog, rpcgen_prog, '-c', '@INPUT@', '@OUTPUT@',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-07-28 09:35:52 +00:00
|
|
|
lock_daemon_sources = files(
|
|
|
|
'lock_daemon.c',
|
|
|
|
'lock_daemon_config.c',
|
|
|
|
'lock_daemon_dispatch.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
lock_daemon_generated = custom_target(
|
|
|
|
'lock_daemon_dispatch_stubs.h',
|
|
|
|
input: lock_protocol,
|
|
|
|
output: 'lock_daemon_dispatch_stubs.h',
|
|
|
|
command: [
|
|
|
|
gendispatch_prog, '--mode=server',
|
|
|
|
'virLockSpaceProtocol', 'VIR_LOCK_SPACE_PROTOCOL', '@INPUT@',
|
|
|
|
],
|
|
|
|
capture: true,
|
|
|
|
)
|
|
|
|
|
2020-06-16 23:07:48 +00:00
|
|
|
sanlock_sources = [
|
|
|
|
'lock_driver_sanlock.c',
|
|
|
|
]
|
|
|
|
|
2020-06-24 11:29:46 +00:00
|
|
|
sanlock_helper_sources = files(
|
|
|
|
'sanlock_helper.c',
|
|
|
|
)
|
|
|
|
|
2020-06-17 23:00:56 +00:00
|
|
|
lock_driver_lib = static_library(
|
|
|
|
'virt_lock_driver',
|
|
|
|
[
|
|
|
|
lock_driver_sources,
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
src_dep,
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
conf_inc_dir,
|
|
|
|
],
|
|
|
|
)
|
2020-07-27 06:39:38 +00:00
|
|
|
|
|
|
|
libvirt_libs += lock_driver_lib
|
2020-06-17 23:09:25 +00:00
|
|
|
|
|
|
|
if conf.has('WITH_LIBVIRTD')
|
|
|
|
lockd_lib_impl = static_library(
|
|
|
|
'lockd_impl',
|
|
|
|
[
|
|
|
|
files(lock_driver_lockd_sources),
|
|
|
|
lock_protocol_generated,
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
conf_inc_dir,
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
rpc_dep,
|
|
|
|
sasl_dep,
|
|
|
|
src_dep,
|
|
|
|
xdr_dep,
|
|
|
|
],
|
|
|
|
)
|
2020-06-24 01:20:55 +00:00
|
|
|
|
|
|
|
lockdriver_dir = libdir / 'libvirt' / 'lock-driver'
|
|
|
|
|
|
|
|
virt_modules += {
|
|
|
|
'name': 'lockd',
|
|
|
|
'name_prefix': '',
|
|
|
|
'sources': [
|
|
|
|
dtrace_gen_objects,
|
|
|
|
],
|
|
|
|
'link_whole': [
|
|
|
|
lockd_lib_impl,
|
|
|
|
],
|
|
|
|
'link_args': [
|
|
|
|
libvirt_no_undefined,
|
|
|
|
],
|
|
|
|
'install_dir': lockdriver_dir,
|
|
|
|
}
|
2020-06-16 23:07:48 +00:00
|
|
|
|
|
|
|
if conf.has('WITH_SANLOCK')
|
|
|
|
virt_modules += {
|
|
|
|
'name': 'sanlock',
|
|
|
|
'name_prefix': '',
|
|
|
|
'sources': [
|
|
|
|
files(sanlock_sources),
|
|
|
|
],
|
|
|
|
'deps': [
|
|
|
|
sanlock_dep,
|
|
|
|
],
|
|
|
|
'link_args': [
|
|
|
|
libvirt_no_undefined,
|
|
|
|
],
|
|
|
|
'install_dir': lockdriver_dir,
|
|
|
|
}
|
|
|
|
endif
|
2020-07-28 09:35:52 +00:00
|
|
|
|
|
|
|
virt_daemons += {
|
|
|
|
'name': 'virtlockd',
|
|
|
|
'sources': [
|
|
|
|
lock_daemon_sources,
|
|
|
|
lock_daemon_generated,
|
|
|
|
lock_protocol_generated,
|
|
|
|
],
|
|
|
|
'include': [
|
|
|
|
include_directories('.'),
|
|
|
|
],
|
|
|
|
}
|
2020-06-24 11:29:46 +00:00
|
|
|
|
2020-07-27 07:03:25 +00:00
|
|
|
virt_daemon_units += {
|
|
|
|
'service': 'virtlockd',
|
|
|
|
'service_in': files('virtlockd.service.in'),
|
|
|
|
'name': '',
|
|
|
|
'sockprefix': '',
|
|
|
|
'sockets': [ 'main', 'admin' ],
|
|
|
|
'socket_in': files('virtlockd.socket.in'),
|
|
|
|
'socket_admin_in': files('virtlockd-admin.socket.in'),
|
|
|
|
}
|
|
|
|
|
2020-07-28 10:11:31 +00:00
|
|
|
openrc_init_files += {
|
|
|
|
'name': 'virtlockd',
|
|
|
|
'in_file': files('virtlockd.init.in'),
|
|
|
|
}
|
|
|
|
|
2020-06-25 15:46:33 +00:00
|
|
|
sysconf_files += {
|
|
|
|
'name': 'virtlockd',
|
|
|
|
'file': files('virtlockd.sysconf'),
|
|
|
|
}
|
|
|
|
|
2020-06-24 11:29:46 +00:00
|
|
|
if conf.has('WITH_SANLOCK')
|
|
|
|
virt_helpers += {
|
|
|
|
'name': 'libvirt_sanlock_helper',
|
|
|
|
'sources': [
|
|
|
|
sanlock_helper_sources,
|
|
|
|
],
|
|
|
|
'include': [
|
|
|
|
conf_inc_dir,
|
|
|
|
],
|
|
|
|
}
|
|
|
|
endif
|
2020-07-27 06:52:17 +00:00
|
|
|
|
|
|
|
virt_aug_files += files('libvirt_lockd.aug')
|
|
|
|
|
|
|
|
if conf.has('WITH_QEMU')
|
|
|
|
qemu_lockd_conf = configure_file(
|
|
|
|
input: 'lockd.conf',
|
|
|
|
output: 'qemu-lockd.conf',
|
|
|
|
copy: true,
|
|
|
|
)
|
|
|
|
virt_conf_files += qemu_lockd_conf
|
2020-06-22 16:04:48 +00:00
|
|
|
virt_test_aug_files += {
|
|
|
|
'name': 'test_libvirt_lockd.aug',
|
|
|
|
'aug' : files('test_libvirt_lockd.aug.in'),
|
|
|
|
'conf': qemu_lockd_conf,
|
|
|
|
}
|
2020-07-27 06:52:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.has('WITH_LIBXL')
|
|
|
|
libxl_lockd_conf = configure_file(
|
|
|
|
input: 'lockd.conf',
|
|
|
|
output: 'libxl-lockd.conf',
|
|
|
|
copy: true,
|
|
|
|
)
|
|
|
|
virt_conf_files += libxl_lockd_conf
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.has('WITH_SANLOCK')
|
|
|
|
virt_aug_files += files('libvirt_sanlock.aug')
|
|
|
|
|
|
|
|
if conf.has('WITH_QEMU')
|
|
|
|
qemu_sanlock_conf = configure_file(
|
|
|
|
input: 'sanlock.conf',
|
|
|
|
output: 'qemu-sanlock.conf',
|
|
|
|
copy: true,
|
|
|
|
)
|
|
|
|
virt_conf_files += qemu_sanlock_conf
|
2020-06-22 16:04:48 +00:00
|
|
|
virt_test_aug_files += {
|
|
|
|
'name': 'test_libvirt_sanlock.aug',
|
|
|
|
'aug' : files('test_libvirt_sanlock.aug.in'),
|
|
|
|
'conf': qemu_sanlock_conf,
|
|
|
|
}
|
2020-07-27 06:52:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.has('WITH_LIBXL')
|
|
|
|
libxl_sanlock_conf = configure_file(
|
|
|
|
input: 'sanlock.conf',
|
|
|
|
output: 'libxl-sanlock.conf',
|
|
|
|
copy: true,
|
|
|
|
)
|
|
|
|
virt_conf_files += libxl_sanlock_conf
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
virt_conf_files += files('virtlockd.conf')
|
|
|
|
virt_aug_files += files('virtlockd.aug')
|
2020-06-22 16:04:48 +00:00
|
|
|
virt_test_aug_files += {
|
|
|
|
'name': 'test_virtlockd.aug',
|
|
|
|
'aug': files('test_virtlockd.aug.in'),
|
|
|
|
'conf': files('virtlockd.conf'),
|
|
|
|
}
|
2020-07-23 10:41:32 +00:00
|
|
|
|
|
|
|
virt_install_dirs += [
|
|
|
|
localstatedir / 'lib' / 'libvirt' / 'lockd',
|
|
|
|
localstatedir / 'lib' / 'libvirt' / 'lockd' / 'files',
|
|
|
|
runstatedir / 'libvirt' / 'lockd',
|
|
|
|
]
|
|
|
|
|
|
|
|
if conf.has('WITH_SANLOCK')
|
|
|
|
virt_install_dirs += [
|
|
|
|
localstatedir / 'lib' / 'libvirt' / 'sanlock',
|
|
|
|
]
|
|
|
|
endif
|
2020-06-17 23:09:25 +00:00
|
|
|
endif
|