From nobody Sun Feb 8 21:26:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1565277249; cv=none; d=zoho.com; s=zohoarc; b=bbO9FK2WsBr7gi7xdjPQmeL7mAUg/YRmvAW7cYxLI6/Svc5KWw9N+2QiARq54kKe/80PT3UeAX9C8IMMxC5oESbjzhLMF8vym/644ohat1lMaDVyIElhaBBMk8PZfRnZeYHQT90bKQloN4V0VrIPdWUlGHmU4B+lyERdary3hCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565277249; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=D7MB+AWiflXgbcT44Ap0fE+6jJLyvMfApDT7aUWZgqc=; b=HiuvrXtYr2Q+AVJ5hr/hZ+gthGy8JBGmHxbk4QOXq+YvwMnCEgu0/bopBNBrHe/bs6TM4OVVOOPzDEFSLXGwyGCvJEdFVWVywyvYEYuWmsXEvk9Gg1OnjqZt6ew1TFa3/xPNHIgfOvzfd2fHk909AG0h2yIjORzmpPB/NMybMwo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565277249717690.7228436992949; Thu, 8 Aug 2019 08:14:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 71EFA14B0F6; Thu, 8 Aug 2019 15:14:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 443F060BF4; Thu, 8 Aug 2019 15:14:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E7C191803B48; Thu, 8 Aug 2019 15:14:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x78FBSS0027464 for ; Thu, 8 Aug 2019 11:11:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3701D1001955; Thu, 8 Aug 2019 15:11:28 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-28.ams2.redhat.com [10.36.112.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96DF81001948; Thu, 8 Aug 2019 15:11:24 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 8 Aug 2019 16:10:18 +0100 Message-Id: <20190808151044.11385-17-berrange@redhat.com> In-Reply-To: <20190808151044.11385-1-berrange@redhat.com> References: <20190808151044.11385-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Christophe de Dinechin , Andrea Bolognani Subject: [libvirt] [PATCH v4 16/42] remote: reduce duplication in systemd unit file make rules into one X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 08 Aug 2019 15:14:09 +0000 (UTC) The make rules for the systemd socket unit files are all essentially identical and can be collapsed into a single generic rule. The service unit file rule can be simplified too. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrang=C3=A9 --- src/Makefile.am | 6 +++++ src/remote/Makefile.inc.am | 49 +++++++------------------------------- 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 150f67e0c3..309947d5f7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -89,6 +89,12 @@ man8_MANS =3D DRIVER_SOURCES =3D man7_MANS =3D =20 +COMMON_UNIT_VARS =3D \ + -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ + -e 's|[@]sbindir[@]|$(sbindir)|g' \ + -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ + $(NULL) + include util/Makefile.inc.am include conf/Makefile.inc.am include cpu/Makefile.inc.am diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 9dc27361fd..554fa4afe9 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -293,48 +293,15 @@ INSTALL_DATA_LOCAL +=3D install-sasl UNINSTALL_LOCAL +=3D uninstall-sasl endif WITH_SASL =20 +LIBVIRTD_UNIT_VARS =3D \ + $(COMMON_UNIT_VARS) \ + $(NULL) + libvirtd.service: remote/libvirtd.service.in $(top_builddir)/config.status - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - -e 's|[@]sbindir[@]|$(sbindir)|g' \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd.socket: remote/libvirtd.socket.in $(top_builddir)/config.status - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd-ro.socket: remote/libvirtd-ro.socket.in $(top_builddir)/config.st= atus - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd-admin.socket: remote/libvirtd-admin.socket.in $(top_builddir)/con= fig.status - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd-tcp.socket: remote/libvirtd-tcp.socket.in $(top_builddir)/config.= status - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd-tls.socket: remote/libvirtd-tls.socket.in $(top_builddir)/config.= status - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - < $< > $@-t && \ - mv $@-t $@ + $(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 $@ =20 virt-guest-shutdown.target: remote/virt-guest-shutdown.target.in \ $(top_builddir)/config.status --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list