From nobody Sun Feb 8 12:37:33 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=1563897863; cv=none; d=zoho.com; s=zohoarc; b=MK7xI83ixw8VINCotGFzklClF64db3xO0uQPX/7l0v2bqGzXEF0EskbNAYSK3oJFjByKhe7JECnJlTkkwoOh3FOTAsjT78fCnI6Xp5WK5fAg6P7wofhciXmwoExDKhcCTSHjmW8/jf+WTQab3XAXuTy7b10ApKrDlxLAZbVcEqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563897863; h=Content-Type:Content-Transfer-Encoding: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=lftM1c/n/7o5BqP9I9PX0zgXNzifWEh1Y2JGcWOsIo0=; b=EO9fQcXFheZ30Ki5DCo88690FQPsAp2XdrMECVjAUx6G5B0B96evneO3sNe78fiTLCHaRxZkeUCE2CK3YpTnzpk1S+vC8UEB1Zq5PEj+TdSPwXBnlvpD36e6Z2kmIH7gsT7FCLCvVtLZlCtugQG3zj7PZwq+M3Kw6Ajbb2dj6FM= 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 1563897863869601.0775189698664; Tue, 23 Jul 2019 09:04:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0889CC065138; Tue, 23 Jul 2019 16:04:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D14591024815; Tue, 23 Jul 2019 16:04:21 +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 8FF8E19735; Tue, 23 Jul 2019 16:04:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6NG4KFe024797 for ; Tue, 23 Jul 2019 12:04:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9B5DB1F8; Tue, 23 Jul 2019 16:04:20 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.112.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE0E15C8A3; Tue, 23 Jul 2019 16:04:13 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 23 Jul 2019 17:02:53 +0100 Message-Id: <20190723160319.18153-16-berrange@redhat.com> In-Reply-To: <20190723160319.18153-1-berrange@redhat.com> References: <20190723160319.18153-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 15/41] 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 23 Jul 2019 16:04:23 +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. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/Makefile.am | 6 +++++ src/remote/Makefile.inc.am | 47 ++++++-------------------------------- 2 files changed, 13 insertions(+), 40 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index dbbb94e7f1..d254069e4b 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 7fd50a15df..6b09fc9294 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -290,48 +290,15 @@ INSTALL_DATA_LOCAL +=3D install-sasl UNINSTALL_LOCAL +=3D uninstall-sasl endif WITH_SASL =20 -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_UNIT_VARS =3D \ + $(COMMON_UNIT_VARS) \ + $(NULL) =20 -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.service: remote/libvirtd.service.in $(top_builddir)/config.status + $(AM_V_GEN)sed $(LIBVIRTD_UNIT_VARS) < $< > $@-t && mv $@-t $@ =20 -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 $@ +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