]> xenbits.xensource.com Git - libvirt.git/commitdiff
systemd: Make service_extra_in/socket_extra_in required
authorAndrea Bolognani <abologna@redhat.com>
Fri, 29 Sep 2023 13:59:34 +0000 (15:59 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 25 Oct 2023 10:19:32 +0000 (12:19 +0200)
We want at least one file to always be present, so that it can
serve as a pointer for users. Ensure that this is the case by
unconditionally using the value of the respective keys.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/meson.build

index 05e89c998f534b05927726aa196da9f64d70827b..43146fe3c3c82f4837359814487ca9b66776c423 100644 (file)
@@ -207,8 +207,8 @@ systemd_service_oomscoreadjust_extra_in = files('virtd.service.oomscoreadjust.ex
 #   * 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 - units to merge with service_in (optional, default [])
-#   * socket_extra_in - units to merge with socket_$name_in (optional, default [])
+#   * service_extra_in - units to merge with service_in (required)
+#   * socket_extra_in - units to merge with socket_$name_in (required)
 virt_daemon_units = []
 
 # openrc_init_files
@@ -830,14 +830,12 @@ if conf.has('WITH_LIBVIRTD')
       service_in = unit.get('service_in', service_in_default)
       service_out = '@0@.service'.format(unit['service'])
 
-      if 'service_extra_in' in unit
-        service_in = configure_file(
-          input: [ service_in ] + unit['service_extra_in'],
-          output: '@0@.in'.format(service_out),
-          command: [ merge_systemd_units_prog, '@INPUT@' ],
-          capture: true,
-        )
-      endif
+      service_in = configure_file(
+        input: [ service_in ] + unit['service_extra_in'],
+        output: '@0@.in'.format(service_out),
+        command: [ merge_systemd_units_prog, '@INPUT@' ],
+        capture: true,
+      )
 
       configure_file(
         input: service_in,
@@ -858,14 +856,12 @@ if conf.has('WITH_LIBVIRTD')
           socket_out = '@0@-@1@.socket'.format(unit['service'], socket)
         endif
 
-        if 'socket_extra_in' in unit
-          socket_in = configure_file(
-            input: [ socket_in ] + unit['socket_extra_in'],
-            output: '@0@.in'.format(socket_out),
-            command: [ merge_systemd_units_prog, '@INPUT@' ],
-            capture: true,
-          )
-        endif
+        socket_in = configure_file(
+          input: [ socket_in ] + unit['socket_extra_in'],
+          output: '@0@.in'.format(socket_out),
+          command: [ merge_systemd_units_prog, '@INPUT@' ],
+          capture: true,
+        )
 
         configure_file(
           input: socket_in,