2020-06-17 23:10:22 +00:00
|
|
|
network_driver_sources = [
|
|
|
|
'bridge_driver.c',
|
|
|
|
'bridge_driver_platform.c',
|
|
|
|
]
|
|
|
|
|
2020-07-27 07:10:31 +00:00
|
|
|
driver_source_files += files(network_driver_sources)
|
2020-07-28 11:46:34 +00:00
|
|
|
stateful_driver_source_files += files(network_driver_sources)
|
2020-07-27 07:10:31 +00:00
|
|
|
|
2020-06-24 11:30:51 +00:00
|
|
|
network_leases_helper_sources = files(
|
|
|
|
'leaseshelper.c',
|
|
|
|
)
|
|
|
|
|
2020-06-17 23:10:22 +00:00
|
|
|
if conf.has('WITH_NETWORK')
|
|
|
|
network_driver_impl = static_library(
|
|
|
|
'virt_driver_network_impl',
|
|
|
|
[
|
|
|
|
network_driver_sources,
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
access_dep,
|
|
|
|
libnl_dep,
|
|
|
|
src_dep,
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
conf_inc_dir,
|
|
|
|
],
|
|
|
|
)
|
2020-06-22 13:25:53 +00:00
|
|
|
|
|
|
|
virt_modules += {
|
|
|
|
'name': 'virt_driver_network',
|
|
|
|
'deps': [
|
|
|
|
libnl_dep,
|
|
|
|
],
|
|
|
|
'link_whole': [
|
|
|
|
network_driver_impl,
|
|
|
|
],
|
|
|
|
'link_args': [
|
|
|
|
libvirt_no_undefined,
|
|
|
|
],
|
|
|
|
}
|
2020-06-22 14:46:37 +00:00
|
|
|
|
|
|
|
virt_daemons += {
|
|
|
|
'name': 'virtnetworkd',
|
|
|
|
'c_args': [
|
|
|
|
'-DDAEMON_NAME="virtnetworkd"',
|
|
|
|
'-DMODULE_NAME="network"',
|
|
|
|
],
|
|
|
|
}
|
2020-06-24 11:30:51 +00:00
|
|
|
|
2020-07-28 09:54:39 +00:00
|
|
|
virt_daemon_confs += {
|
|
|
|
'name': 'virtnetworkd',
|
|
|
|
}
|
|
|
|
|
2020-06-24 11:30:51 +00:00
|
|
|
virt_helpers += {
|
|
|
|
'name': 'libvirt_leaseshelper',
|
|
|
|
'sources': [
|
|
|
|
network_leases_helper_sources,
|
|
|
|
dtrace_gen_objects,
|
|
|
|
],
|
|
|
|
}
|
2020-07-27 07:03:25 +00:00
|
|
|
|
|
|
|
virt_daemon_units += {
|
|
|
|
'service': 'virtnetworkd',
|
|
|
|
'service_in': files('virtnetworkd.service.in'),
|
|
|
|
'name': 'Libvirt network',
|
|
|
|
'sockprefix': 'virtnetworkd',
|
|
|
|
'sockets': [ 'main', 'ro', 'admin' ],
|
|
|
|
}
|
2020-07-28 10:11:31 +00:00
|
|
|
|
|
|
|
openrc_init_files += {
|
|
|
|
'name': 'virtnetworkd',
|
|
|
|
'in_file': files('virtnetworkd.init.in'),
|
|
|
|
}
|
2020-06-25 15:46:33 +00:00
|
|
|
|
2020-07-23 10:41:32 +00:00
|
|
|
virt_install_dirs += [
|
2022-02-02 10:35:51 +00:00
|
|
|
confdir / 'qemu' / 'networks',
|
|
|
|
confdir / 'qemu' / 'networks' / 'autostart',
|
2020-07-23 10:41:32 +00:00
|
|
|
localstatedir / 'lib' / 'libvirt' / 'network',
|
|
|
|
localstatedir / 'lib' / 'libvirt' / 'dnsmasq',
|
|
|
|
runstatedir / 'libvirt' / 'network',
|
|
|
|
]
|
2020-07-23 11:00:08 +00:00
|
|
|
|
2020-11-15 15:30:34 +00:00
|
|
|
configure_file(
|
|
|
|
input: 'default.xml.in',
|
|
|
|
output: '@BASENAME@',
|
|
|
|
copy: true,
|
|
|
|
install: true,
|
|
|
|
install_dir: confdir / 'qemu' / 'networks',
|
|
|
|
)
|
2020-07-23 11:00:08 +00:00
|
|
|
|
|
|
|
meson.add_install_script(
|
|
|
|
meson_python_prog.path(), python3_prog.path(), meson_install_symlink_prog.path(),
|
|
|
|
confdir / 'qemu' / 'networks' / 'autostart',
|
|
|
|
'../default.xml', 'default.xml',
|
|
|
|
)
|
2020-06-25 15:30:21 +00:00
|
|
|
|
|
|
|
if conf.has('WITH_FIREWALLD_ZONE')
|
|
|
|
install_data(
|
|
|
|
'libvirt.zone',
|
|
|
|
install_dir: prefix / 'lib' / 'firewalld' / 'zones',
|
|
|
|
rename: [ 'libvirt.xml' ],
|
|
|
|
)
|
|
|
|
endif
|
2020-06-17 23:10:22 +00:00
|
|
|
endif
|