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@xxxxxxxxxx> --- src/ch/meson.build | 4 +++- src/libxl/meson.build | 8 ++++++-- src/lxc/meson.build | 4 +++- src/meson.build | 12 ++++++------ src/network/meson.build | 4 +++- src/qemu/meson.build | 4 +++- src/storage/meson.build | 4 +++- src/vbox/meson.build | 4 +++- src/vz/meson.build | 4 +++- 9 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/ch/meson.build b/src/ch/meson.build index df246ef9b0..7cee90d0da 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -58,7 +58,9 @@ if conf.has('WITH_CH') virt_daemon_units += { 'service': 'virtchd', 'name': 'Cloud Hypervisor', - 'service_extra_in': files('virtchd.service.extra.in'), + 'service_extra_in': [ + files('virtchd.service.extra.in'), + ], } virt_install_dirs += [ diff --git a/src/libxl/meson.build b/src/libxl/meson.build index 8e6f455139..e75a8f2fdb 100644 --- a/src/libxl/meson.build +++ b/src/libxl/meson.build @@ -67,8 +67,12 @@ if conf.has('WITH_LIBXL') virt_daemon_units += { 'service': 'virtxend', 'name': 'Xen', - 'service_extra_in': files('virtxend.service.extra.in'), - 'socket_extra_in': files('virtxend.socket.extra.in'), + 'service_extra_in': [ + files('virtxend.service.extra.in'), + ], + 'socket_extra_in': [ + files('virtxend.socket.extra.in'), + ], } openrc_init_files += { diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 5eb23fbbbf..198e282e63 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -165,7 +165,9 @@ if conf.has('WITH_LXC') virt_daemon_units += { 'service': 'virtlxcd', 'name': 'LXC', - 'service_extra_in': files('virtlxcd.service.extra.in'), + 'service_extra_in': [ + files('virtlxcd.service.extra.in'), + ], } openrc_init_files += { diff --git a/src/meson.build b/src/meson.build index 144f24e526..f3814d75ce 100644 --- a/src/meson.build +++ b/src/meson.build @@ -199,8 +199,8 @@ guest_unit_files = [] # * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ]) # * 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) -# * service_extra_in - unit to merge with service_in (optional, default None) -# * socket_extra_in - unit to merge with socket_$name_in (optional, default None) +# * service_extra_in - units to merge with service_in (optional, default []) +# * socket_extra_in - units to merge with socket_$name_in (optional, default []) virt_daemon_units = [] # openrc_init_files @@ -824,9 +824,9 @@ if conf.has('WITH_LIBVIRTD') if 'service_extra_in' in unit service_in = configure_file( - input: [ service_in, unit['service_extra_in'] ], + input: [ service_in ] + unit['service_extra_in'], output: '@0@.in'.format(service_out), - command: [ merge_systemd_units_prog, '@INPUT0@', '@INPUT1@' ], + command: [ merge_systemd_units_prog, '@INPUT@' ], capture: true, ) endif @@ -852,9 +852,9 @@ if conf.has('WITH_LIBVIRTD') if 'socket_extra_in' in unit socket_in = configure_file( - input: [ socket_in, unit['socket_extra_in'] ], + input: [ socket_in ] + unit['socket_extra_in'], output: '@0@.in'.format(socket_out), - command: [ merge_systemd_units_prog, '@INPUT0@', '@INPUT1@' ], + command: [ merge_systemd_units_prog, '@INPUT@' ], capture: true, ) endif diff --git a/src/network/meson.build b/src/network/meson.build index d0383cca1c..3cf2ef3d3d 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -63,7 +63,9 @@ if conf.has('WITH_NETWORK') virt_daemon_units += { 'service': 'virtnetworkd', 'name': 'network', - 'service_extra_in': files('virtnetworkd.service.extra.in'), + 'service_extra_in': [ + files('virtnetworkd.service.extra.in'), + ], } openrc_init_files += { diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 64c62e584f..fff61ddf27 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -184,7 +184,9 @@ if conf.has('WITH_QEMU') virt_daemon_units += { 'service': 'virtqemud', 'name': 'QEMU', - 'service_extra_in': files('virtqemud.service.extra.in'), + 'service_extra_in': [ + files('virtqemud.service.extra.in'), + ], } openrc_init_files += { diff --git a/src/storage/meson.build b/src/storage/meson.build index 023353c1d6..daad8abf25 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -112,7 +112,9 @@ if conf.has('WITH_STORAGE') virt_daemon_units += { 'service': 'virtstoraged', 'name': 'storage', - 'service_extra_in': files('virtstoraged.service.extra.in'), + 'service_extra_in': [ + files('virtstoraged.service.extra.in'), + ], } openrc_init_files += { diff --git a/src/vbox/meson.build b/src/vbox/meson.build index a72c1833f1..e05f532e35 100644 --- a/src/vbox/meson.build +++ b/src/vbox/meson.build @@ -58,7 +58,9 @@ if conf.has('WITH_VBOX') virt_daemon_units += { 'service': 'virtvboxd', 'name': 'VirtualBox', - 'service_extra_in': files('virtvboxd.service.extra.in'), + 'service_extra_in': [ + files('virtvboxd.service.extra.in'), + ], } openrc_init_files += { diff --git a/src/vz/meson.build b/src/vz/meson.build index ce2cbae454..bc5b5fb623 100644 --- a/src/vz/meson.build +++ b/src/vz/meson.build @@ -49,7 +49,9 @@ if conf.has('WITH_VZ') virt_daemon_units += { 'service': 'virtvzd', 'name': 'vz', - 'service_extra_in': files('virtvzd.service.extra.in'), + 'service_extra_in': [ + files('virtvzd.service.extra.in'), + ], } openrc_init_files += { -- 2.41.0