Re: [PATCH 15/41] remote: reduce duplication in systemd unit file make rules into one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2019-07-23 at 17:02 +0100, Daniel P. Berrangé wrote:
[...]
> +COMMON_UNIT_VARS = \
> +	-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
> +	-e 's|[@]sbindir[@]|$(sbindir)|g' \
> +	-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
> +	$(NULL)
>  
> +LIBVIRTD_UNIT_VARS = \
> +	$(COMMON_UNIT_VARS) \
> +	$(NULL)
>  
> +libvirtd.service: remote/libvirtd.service.in $(top_builddir)/config.status
> +	$(AM_V_GEN)sed $(LIBVIRTD_UNIT_VARS) < $< > $@-t && mv $@-t $@
>  
> +libvirt%.socket: remote/libvirt%.socket.in $(top_builddir)/config.status
> +	$(AM_V_GEN)sed $(LIBVIRTD_UNIT_VARS) < $< > $@-t && mv $@-t $@

This is a fantastic refactoring that I've been thinking about
spending time on for a long time, so thanks a lot for doing it!

It's a bummer that we don't go further in our DRY crusade and extend
it to .service files (even after the entire series has been applied),
but we can always do that as a follow-up series :)

  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux