From: Andrea Bolognani Date: Tue, 19 Sep 2023 15:25:27 +0000 (+0200) Subject: systemd: Make @sockprefix@ optional X-Git-Tag: v9.8.0-rc2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f78e9f910997f929c0515c1d92310898359e356;p=thirdparty%2Flibvirt.git systemd: Make @sockprefix@ optional For most services, the socket paths can be derived trivially from the name of the daemon: for virtqemud, for example, they will be /run/libvirt/virtqemud-sock /run/libvirt/virtqemud-sock-ro /run/libvirt/virtqemud-admin-sock libvirtd and virtproxyd are the exceptions, since their socket paths will be /run/libvirt/libvirt-sock /run/libvirt/libvirt-sock-ro /run/libvirt/libvirt-admin-sock So we still need to be able to provide a custom @sockprefix@ in those cases, but in the most common scenario we can do away with the requirement by introducing a sensible default. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrangé --- diff --git a/src/meson.build b/src/meson.build index 9d5085a8aa..6c85cc9b9b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -196,7 +196,7 @@ guest_unit_files = [] # * service - name of the service (required) # * service_in - service source file (required) # * name - socket description (required) -# * sockprefix - socket prefix name (required) +# * sockprefix - socket prefix name (optional, default unit['service']) # * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ]) # * socket_$name_in - additional socket source files (optional, default remote/libvirtd.socket.in ) # * deps - socket dependencies (optional, default '') @@ -811,7 +811,7 @@ if conf.has('WITH_LIBVIRTD') 'initconfdir': initconfdir, 'name': unit['name'], 'service': unit['service'], - 'sockprefix': unit['sockprefix'], + 'sockprefix': unit.get('sockprefix', unit['service']), 'deps': unit.get('deps', ''), 'sockmode': sockmode, })