]> xenbits.xensource.com Git - libvirt.git/commitdiff
systemd: Make @service_in@ optional
authorAndrea Bolognani <abologna@redhat.com>
Thu, 21 Sep 2023 15:08:28 +0000 (17:08 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 2 Oct 2023 08:41:07 +0000 (10:41 +0200)
It is currently considered required, but we're soon going to
provide a default that will be suitable for most services.

Since all services currently provide a value explicitly, we
can implement a default without breaking anything.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/meson.build

index c6728cc8f86747469b9948a023566f405679c1fa..b7c2076c04cd7ba29d07fb159c6ebb47f06fba5d 100644 (file)
@@ -194,10 +194,10 @@ guest_unit_files = []
 # virt_daemon_units:
 #   generate libvirt daemon systemd unit files
 #   * service - name of the service (required)
-#   * service_in - service source file (required)
 #   * name - socket description (required)
 #   * sockprefix - socket prefix name (optional, default unit['service'])
 #   * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ])
+#   * service_in - service source file (optional, default remote/libvirtd.service.in)
 #   * socket_$name_in - additional socket source files (optional, default remote/libvirtd.socket.in )
 #   * deps - socket dependencies (optional, default '')
 virt_daemon_units = []
@@ -803,6 +803,8 @@ if conf.has('WITH_LIBVIRTD')
       sockmode = '0600'
     endif
 
+    service_in_default = 'remote' / 'libvirtd.service.in'
+
     foreach unit : virt_daemon_units
       unit_conf = configuration_data({
         'runstatedir': runstatedir,
@@ -816,7 +818,7 @@ if conf.has('WITH_LIBVIRTD')
         'sockmode': sockmode,
       })
 
-      service_in = unit['service_in']
+      service_in = unit.get('service_in', service_in_default)
       service_out = '@0@.service'.format(unit['service'])
 
       configure_file(