mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
systemd: Accept multiple files for service_extra_in/socket_extra_in
Now that the underlying script is able to merge an arbitrary number of units into the base template, expose this possibility in the build system. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
b1aeca5db0
commit
c8ae549cd5
@ -60,7 +60,9 @@ if conf.has('WITH_CH')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtchd',
|
'service': 'virtchd',
|
||||||
'name': 'Cloud Hypervisor',
|
'name': 'Cloud Hypervisor',
|
||||||
'service_extra_in': files('virtchd.service.extra.in'),
|
'service_extra_in': [
|
||||||
|
files('virtchd.service.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
virt_install_dirs += [
|
virt_install_dirs += [
|
||||||
|
@ -67,8 +67,12 @@ if conf.has('WITH_LIBXL')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtxend',
|
'service': 'virtxend',
|
||||||
'name': 'Xen',
|
'name': 'Xen',
|
||||||
'service_extra_in': files('virtxend.service.extra.in'),
|
'service_extra_in': [
|
||||||
'socket_extra_in': files('virtxend.socket.extra.in'),
|
files('virtxend.service.extra.in'),
|
||||||
|
],
|
||||||
|
'socket_extra_in': [
|
||||||
|
files('virtxend.socket.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
openrc_init_files += {
|
openrc_init_files += {
|
||||||
|
@ -165,7 +165,9 @@ if conf.has('WITH_LXC')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtlxcd',
|
'service': 'virtlxcd',
|
||||||
'name': 'LXC',
|
'name': 'LXC',
|
||||||
'service_extra_in': files('virtlxcd.service.extra.in'),
|
'service_extra_in': [
|
||||||
|
files('virtlxcd.service.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
openrc_init_files += {
|
openrc_init_files += {
|
||||||
|
@ -199,8 +199,8 @@ guest_unit_files = []
|
|||||||
# * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ])
|
# * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ])
|
||||||
# * service_in - service source file (optional, default virtd.service.in)
|
# * service_in - service source file (optional, default virtd.service.in)
|
||||||
# * socket_$name_in - additional socket source files (optional, default virtd.socket.in or virtd-$name.socket.in)
|
# * socket_$name_in - additional socket source files (optional, default virtd.socket.in or virtd-$name.socket.in)
|
||||||
# * service_extra_in - unit to merge with service_in (optional, default None)
|
# * service_extra_in - units to merge with service_in (optional, default [])
|
||||||
# * socket_extra_in - unit to merge with socket_$name_in (optional, default None)
|
# * socket_extra_in - units to merge with socket_$name_in (optional, default [])
|
||||||
virt_daemon_units = []
|
virt_daemon_units = []
|
||||||
|
|
||||||
# openrc_init_files
|
# openrc_init_files
|
||||||
@ -824,9 +824,9 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
|
|
||||||
if 'service_extra_in' in unit
|
if 'service_extra_in' in unit
|
||||||
service_in = configure_file(
|
service_in = configure_file(
|
||||||
input: [ service_in, unit['service_extra_in'] ],
|
input: [ service_in ] + unit['service_extra_in'],
|
||||||
output: '@0@.in'.format(service_out),
|
output: '@0@.in'.format(service_out),
|
||||||
command: [ merge_systemd_units_prog, '@INPUT0@', '@INPUT1@' ],
|
command: [ merge_systemd_units_prog, '@INPUT@' ],
|
||||||
capture: true,
|
capture: true,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
@ -852,9 +852,9 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
|
|
||||||
if 'socket_extra_in' in unit
|
if 'socket_extra_in' in unit
|
||||||
socket_in = configure_file(
|
socket_in = configure_file(
|
||||||
input: [ socket_in, unit['socket_extra_in'] ],
|
input: [ socket_in ] + unit['socket_extra_in'],
|
||||||
output: '@0@.in'.format(socket_out),
|
output: '@0@.in'.format(socket_out),
|
||||||
command: [ merge_systemd_units_prog, '@INPUT0@', '@INPUT1@' ],
|
command: [ merge_systemd_units_prog, '@INPUT@' ],
|
||||||
capture: true,
|
capture: true,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
@ -63,7 +63,9 @@ if conf.has('WITH_NETWORK')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtnetworkd',
|
'service': 'virtnetworkd',
|
||||||
'name': 'network',
|
'name': 'network',
|
||||||
'service_extra_in': files('virtnetworkd.service.extra.in'),
|
'service_extra_in': [
|
||||||
|
files('virtnetworkd.service.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
openrc_init_files += {
|
openrc_init_files += {
|
||||||
|
@ -184,7 +184,9 @@ if conf.has('WITH_QEMU')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtqemud',
|
'service': 'virtqemud',
|
||||||
'name': 'QEMU',
|
'name': 'QEMU',
|
||||||
'service_extra_in': files('virtqemud.service.extra.in'),
|
'service_extra_in': [
|
||||||
|
files('virtqemud.service.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
openrc_init_files += {
|
openrc_init_files += {
|
||||||
|
@ -112,7 +112,9 @@ if conf.has('WITH_STORAGE')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtstoraged',
|
'service': 'virtstoraged',
|
||||||
'name': 'storage',
|
'name': 'storage',
|
||||||
'service_extra_in': files('virtstoraged.service.extra.in'),
|
'service_extra_in': [
|
||||||
|
files('virtstoraged.service.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
openrc_init_files += {
|
openrc_init_files += {
|
||||||
|
@ -58,7 +58,9 @@ if conf.has('WITH_VBOX')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtvboxd',
|
'service': 'virtvboxd',
|
||||||
'name': 'VirtualBox',
|
'name': 'VirtualBox',
|
||||||
'service_extra_in': files('virtvboxd.service.extra.in'),
|
'service_extra_in': [
|
||||||
|
files('virtvboxd.service.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
openrc_init_files += {
|
openrc_init_files += {
|
||||||
|
@ -49,7 +49,9 @@ if conf.has('WITH_VZ')
|
|||||||
virt_daemon_units += {
|
virt_daemon_units += {
|
||||||
'service': 'virtvzd',
|
'service': 'virtvzd',
|
||||||
'name': 'vz',
|
'name': 'vz',
|
||||||
'service_extra_in': files('virtvzd.service.extra.in'),
|
'service_extra_in': [
|
||||||
|
files('virtvzd.service.extra.in'),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
openrc_init_files += {
|
openrc_init_files += {
|
||||||
|
Loading…
Reference in New Issue
Block a user