From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227337656204.95547753854748; Wed, 21 Feb 2018 07:35:37 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD59210F3EC; Wed, 21 Feb 2018 15:35:35 +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 3F8185C20C; Wed, 21 Feb 2018 15:35:35 +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 A3FAC4A46D; Wed, 21 Feb 2018 15:35:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZWXx020912 for ; Wed, 21 Feb 2018 10:35:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7B4D410A9717; Wed, 21 Feb 2018 15:35:32 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9BE310A9711; Wed, 21 Feb 2018 15:35:31 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:16 +0000 Message-Id: <20180221153525.14973-2-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/10] src: simplify systemd unit file handling in make rules 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Feb 2018 15:35:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Remove lots of duplication in the systemd unit file handling, so we can add more unit files without modifying so many places. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/Makefile.am | 50 +++++++++++++++++++------------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 38fa1e3393..3e6fb6c244 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2796,16 +2796,20 @@ MANINFILES =3D \ CLEANFILES +=3D test_virtlockd.aug test_virtlogd.aug $(man8_MANS) MAINTAINERCLEANFILES +=3D $(MANINFILES) =20 +SYSTEMD_UNIT_FILES_IN =3D \ + locking/virtlockd.service.in \ + locking/virtlockd.socket.in \ + locking/virtlockd-admin.socket.in \ + logging/virtlogd.service.in \ + logging/virtlogd.socket.in \ + logging/virtlogd-admin.socket.in \ + $(NULL) + EXTRA_DIST +=3D \ - locking/virtlockd.service.in \ - locking/virtlockd.socket.in \ - locking/virtlockd-admin.socket.in \ + $(SYSTEMD_UNIT_FILES_IN) \ locking/virtlockd.aug \ locking/virtlockd.conf \ locking/test_virtlockd.aug.in \ - logging/virtlogd.service.in \ - logging/virtlogd.socket.in \ - logging/virtlogd-admin.socket.in \ logging/virtlogd.aug \ logging/virtlogd.conf \ logging/test_virtlogd.aug.in \ @@ -2818,36 +2822,20 @@ if WITH_LIBVIRTD if LIBVIRT_INIT_SCRIPT_SYSTEMD =20 SYSTEMD_UNIT_DIR =3D $(prefix)/lib/systemd/system +SYSTEMD_UNIT_FILES =3D $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=3D%)) =20 -BUILT_SOURCES +=3D virtlockd.service virtlockd.socket virtlockd-admin.sock= et \ - virtlogd.service virtlogd.socket virtlogd-admin.socket -DISTCLEANFILES +=3D virtlockd.service virtlockd.socket virtlockd-admin.soc= ket \ - virtlogd.service virtlogd.socket virtlogd-admin.socket +BUILT_SOURCES +=3D $(SYSTEMD_UNIT_FILES) +DISTCLEANFILES +=3D $(SYSTEMD_UNIT_FILES) =20 -install-systemd: virtlockd.service virtlockd.socket virtlockd-admin.socket= \ - virtlogd.service virtlogd.socket virtlogd-admin.socket \ - install-sysconfig +install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - $(INSTALL_DATA) virtlockd.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ - $(INSTALL_DATA) virtlockd.socket \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ - $(INSTALL_DATA) virtlockd-admin.socket \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ - $(INSTALL_DATA) virtlogd.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ - $(INSTALL_DATA) virtlogd.socket \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ - $(INSTALL_DATA) virtlogd-admin.socket \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ + for f in $(SYSTEMD_UNIT_FILES); \ + do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \ + done =20 uninstall-systemd: uninstall-sysconfig - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd-admin.socket - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.socket \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd-admin.socket + rm -f $(SYSTEMD_UNIT_FILES:%=3D$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%) rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : else ! LIBVIRT_INIT_SCRIPT_SYSTEMD install-systemd: --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15192273385781003.5696572226582; Wed, 21 Feb 2018 07:35:38 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A8ECF76531; Wed, 21 Feb 2018 15:35:35 +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 72BAF608F6; Wed, 21 Feb 2018 15:35:35 +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 2422C4A46C; Wed, 21 Feb 2018 15:35:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZXlN020924 for ; Wed, 21 Feb 2018 10:35:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id B19CE10A9713; Wed, 21 Feb 2018 15:35:33 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBCED10A9711; Wed, 21 Feb 2018 15:35:32 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:17 +0000 Message-Id: <20180221153525.14973-3-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/10] src: simplify sysv init file handling in make rules 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 21 Feb 2018 15:35:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Remove lots of duplication in the sysv init file handling, so we can add more init files without modifying so many places. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/Makefile.am | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 3e6fb6c244..de2441dd6b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2702,24 +2702,30 @@ uninstall-sysconfig: rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : =20 -EXTRA_DIST +=3D locking/virtlockd.init.in logging/virtlogd.init.in +SYSVINIT_FILES_IN =3D \ + locking/virtlockd.init.in \ + logging/virtlogd.init.in \ + $(NULL) + +SYSVINIT_FILES =3D $(notdir $(SYSVINIT_FILES_IN:%.in=3D%)) + +EXTRA_DIST +=3D $(SYSVINIT_FILES_IN) =20 if WITH_LIBVIRTD if LIBVIRT_INIT_SCRIPT_RED_HAT -install-init:: virtlockd.init virtlogd.init install-sysconfig +install-init:: $(SYSVINIT_FILES) install-sysconfig $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d - $(INSTALL_SCRIPT) virtlockd.init \ - $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd - $(INSTALL_SCRIPT) virtlogd.init \ - $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlogd + for f in $(SYSVINIT_FILES:%.init=3D%) ; \ + do \ + $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \ + done =20 uninstall-init:: uninstall-sysconfig - rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd - rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlogd + rm -f $(SYSVINIT_FILES:%.init=3D$(DESTDIR)$(sysconfdir)/rc.d/init.d/%) rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || : =20 -BUILT_SOURCES +=3D virtlockd.init virtlogd.init -DISTCLEANFILES +=3D virtlockd.init virtlogd.init +BUILT_SOURCES +=3D $(SYSVINIT_FILES) +DISTCLEANFILES +=3D $(SYSVINIT_FILES) else ! LIBVIRT_INIT_SCRIPT_RED_HAT install-init:: uninstall-init:: --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227345226438.65201078553866; Wed, 21 Feb 2018 07:35:45 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA157272AB; Wed, 21 Feb 2018 15:35:43 +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 A362C60603; Wed, 21 Feb 2018 15:35:43 +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 67340181A878; Wed, 21 Feb 2018 15:35:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZYXk020937 for ; Wed, 21 Feb 2018 10:35:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7CBD010A9717; Wed, 21 Feb 2018 15:35:34 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0726810A9711; Wed, 21 Feb 2018 15:35:33 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:18 +0000 Message-Id: <20180221153525.14973-4-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/10] src: simplify sysconfig file handling in make rules 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Feb 2018 15:35:44 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Remove lots of duplication in the sysconfig file handling, so we can add more conf files without modifying so many places. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/Makefile.am | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index de2441dd6b..bb51be50d7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2683,23 +2683,30 @@ EXTRA_DIST +=3D $(LOCK_DAEMON_SOURCES) \ $(LOG_DAEMON_SOURCES) endif ! WITH_LIBVIRTD =20 -EXTRA_DIST +=3D \ +SYSCONF_FILES =3D \ locking/virtlockd.sysconf \ + logging/virtlogd.sysconf \ + $(NULL) + +EXTRA_DIST +=3D \ locking/lockd.conf \ locking/libvirt_lockd.aug \ - locking/test_libvirt_lockd.aug.in \ - logging/virtlogd.sysconf + locking/test_libvirt_lockd.aug.in =20 install-sysconfig: $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig - $(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \ - $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd - $(INSTALL_DATA) $(srcdir)/logging/virtlogd.sysconf \ - $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd + for f in $(SYSCONF_FILES:%.sysconf=3D%) ; \ + do \ + tgt=3D`basename $$f`; \ + $(INSTALL_SCRIPT) $$f.sysconf $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ + done =20 uninstall-sysconfig: - rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd - rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd + for f in $(SYSCONF_FILES:%.sysconf=3D%) ; \ + do \ + tgt=3D`basename $$f`; \ + rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ + done rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : =20 SYSVINIT_FILES_IN =3D \ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227347901306.1141137152081; Wed, 21 Feb 2018 07:35:47 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 83DEEC05E75B; Wed, 21 Feb 2018 15:35:46 +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 4DF9A600D3; Wed, 21 Feb 2018 15:35:46 +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 D0944181A87D; Wed, 21 Feb 2018 15:35:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZZBF020944 for ; Wed, 21 Feb 2018 10:35:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5AB2710A9713; Wed, 21 Feb 2018 15:35:35 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1D3010A9711; Wed, 21 Feb 2018 15:35:34 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:19 +0000 Message-Id: <20180221153525.14973-5-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/10] daemon: remove obsolete doc describing daemon threading 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 21 Feb 2018 15:35:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 The THREADS.txt describes the way threading worked in libvirtd many many years ago, long before even the RPC code was modularized. Things have evolved significantly since then, so delete this potentially misleading doc. Signed-off-by: Daniel P. Berrang=C3=A9 --- daemon/THREADS.txt | 52 --------------------------------------------------= -- 1 file changed, 52 deletions(-) delete mode 100644 daemon/THREADS.txt diff --git a/daemon/THREADS.txt b/daemon/THREADS.txt deleted file mode 100644 index ae4e9bad90..0000000000 --- a/daemon/THREADS.txt +++ /dev/null @@ -1,52 +0,0 @@ - - Threading in the libvirtd daemon - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D - -To allow efficient processing of RPC requests, the libvirtd daemon -makes use of threads. - - - The process leader. This is the initial thread of control - when the daemon starts running. It is responsible for - initializing all the state, and starting the event loop. - Once that's all done, this thread does nothing except - wait for the event loop to quit, thus indicating an orderly - shutdown is required. - - - The event loop. This thread runs the event loop, sitting - in poll() on all monitored file handles, and calculating - and dispatching any timers that may be registered. When - this thread quits, the entire daemon will shutdown. - - - The workers. These 'n' threads all sit around waiting to - process incoming RPC requests. Since RPC requests may take - a long time to complete, with long idle periods, there will - be quite a few workers running. - -The use of threads obviously requires locking to ensure safety when -accessing/changing data structures. - - - the top level lock is on 'struct qemud_server'. This must be - held before acquiring any other lock - - - Each 'struct qemud_client' object has a lock. The server lock - must be held before acquiring it. Once the client lock is acquired - the server lock can (optionally) be dropped. - - - The event loop has its own self-contained lock. You can ignore - this as a caller of virEvent APIs. - - -The server lock is used in conjunction with a condition variable -to pass jobs from the event loop thread to the workers. The main -event loop thread handles I/O from the client socket, and once a -complete RPC message has been read off the wire (and optionally -decrypted), it will be placed on the 'dx' job queue for the -associated client object. The job condition will be signalled and -a worker will wakeup and process it. - -The worker thread must quickly drop its locks on the server and -client to allow the main event loop thread to continue running -with its other work. Critically important, is that now libvirt -API call will ever be made with the server or client locks held. - --- End --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227351339777.5789553992919; Wed, 21 Feb 2018 07:35:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF1552AD63; Wed, 21 Feb 2018 15:35:49 +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 ADED6608F6; Wed, 21 Feb 2018 15:35:49 +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 6ECB64A476; Wed, 21 Feb 2018 15:35:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZa5W020957 for ; Wed, 21 Feb 2018 10:35:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 63C2610A9717; Wed, 21 Feb 2018 15:35:36 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9FCD10A9711; Wed, 21 Feb 2018 15:35:35 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:20 +0000 Message-Id: <20180221153525.14973-6-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/10] daemon: move libvirtd code into src/remote/ directory 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Feb 2018 15:35:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Having a daemon/ directory makes little sense from a code structure point of view, as 90% of the code that is built into libvirtd already lives in the src/ directory. The virtlockd and virlogd daemons also live entirely in src/{locking,logging} directories. This moves the source code for libvirtd into src/remote/, alongside the client code. Signed-off-by: Daniel P. Berrang=C3=A9 --- .gitignore | 2 + daemon/Makefile.am | 125 +----------------= ---- src/Makefile.am | 93 ++++++++++++++- daemon/libvirtd.c =3D> src/remote/remote_daemon.c | 10 +- daemon/libvirtd.h =3D> src/remote/remote_daemon.h | 10 +- .../remote/remote_daemon_config.c | 10 +- .../remote/remote_daemon_config.h | 10 +- .../remote/remote_daemon_dispatch.c | 16 +-- .../remote/remote_daemon_dispatch.h | 10 +- .../stream.c =3D> src/remote/remote_daemon_stream.c | 8 +- .../stream.h =3D> src/remote/remote_daemon_stream.h | 12 +- 11 files changed, 136 insertions(+), 170 deletions(-) rename daemon/libvirtd.c =3D> src/remote/remote_daemon.c (99%) rename daemon/libvirtd.h =3D> src/remote/remote_daemon.h (93%) rename daemon/libvirtd-config.c =3D> src/remote/remote_daemon_config.c (98= %) rename daemon/libvirtd-config.h =3D> src/remote/remote_daemon_config.h (92= %) rename daemon/remote.c =3D> src/remote/remote_daemon_dispatch.c (99%) rename daemon/remote.h =3D> src/remote/remote_daemon_dispatch.h (85%) rename daemon/stream.c =3D> src/remote/remote_daemon_stream.c (99%) rename daemon/stream.h =3D> src/remote/remote_daemon_stream.h (85%) diff --git a/.gitignore b/.gitignore index 189116a3d0..415d6d166b 100644 --- a/.gitignore +++ b/.gitignore @@ -139,6 +139,7 @@ /src/libvirt_*helper /src/libvirt_*probes.h /src/libvirt_lxc +/src/libvirtd /src/locking/libxl-lockd.conf /src/locking/libxl-sanlock.conf /src/locking/lock_daemon_dispatch_stubs.h @@ -157,6 +158,7 @@ /src/qemu/test_libvirtd_qemu.aug /src/remote/*_client_bodies.h /src/remote/*_protocol.[ch] +/src/remote/*_stubs.h /src/rpc/virkeepaliveprotocol.[ch] /src/rpc/virnetprotocol.[ch] /src/test_libvirt*.aug diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 42d8f7b3fd..4f682fa740 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -16,37 +16,8 @@ ## License along with this library. If not, see ## . =20 -INCLUDES =3D \ - -I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \ - -I$(top_srcdir) \ - -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/src -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/util \ - -I$(top_srcdir)/src/conf \ - -I$(top_srcdir)/src/rpc \ - -I$(top_srcdir)/src/remote \ - -I$(top_srcdir)/src/admin \ - -I$(top_srcdir)/src/access \ - $(GETTEXT_CPPFLAGS) - CLEANFILES =3D =20 -WARN_CFLAGS +=3D $(STRICT_FRAME_LIMIT_CFLAGS) - -DAEMON_GENERATED =3D \ - remote_dispatch.h \ - lxc_dispatch.h \ - qemu_dispatch.h \ - $(NULL) - -DAEMON_SOURCES =3D \ - libvirtd.c libvirtd.h \ - remote.c remote.h \ - stream.c stream.h \ - $(DAEMON_GENERATED) - -LIBVIRTD_CONF_SOURCES =3D libvirtd-config.c libvirtd-config.h - PODFILES =3D \ libvirtd.pod \ $(NULL) @@ -57,9 +28,6 @@ MANINFILES =3D \ =20 DISTCLEANFILES =3D EXTRA_DIST =3D \ - remote_dispatch.h \ - lxc_dispatch.h \ - qemu_dispatch.h \ libvirtd.conf \ libvirtd.init.in \ libvirtd.upstart \ @@ -80,59 +48,14 @@ EXTRA_DIST =3D \ THREADS.txt \ $(PODFILES) \ $(MANINFILES) \ - $(DAEMON_SOURCES) \ - $(LIBVIRTD_CONF_SOURCES) \ $(NULL) =20 BUILT_SOURCES =3D =20 -REMOTE_PROTOCOL =3D $(top_srcdir)/src/remote/remote_protocol.x -LXC_PROTOCOL =3D $(top_srcdir)/src/remote/lxc_protocol.x -QEMU_PROTOCOL =3D $(top_srcdir)/src/remote/qemu_protocol.x -ADMIN_PROTOCOL =3D $(top_srcdir)/src/admin/admin_protocol.x - -remote_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \ - $(REMOTE_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ - --mode=3Dserver remote REMOTE $(REMOTE_PROTOCOL) \ - > $(srcdir)/remote_dispatch.h - -lxc_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \ - $(LXC_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ - --mode=3Dserver lxc LXC $(LXC_PROTOCOL) \ - > $(srcdir)/lxc_dispatch.h - -qemu_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \ - $(QEMU_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ - --mode=3Dserver qemu QEMU $(QEMU_PROTOCOL) \ - > $(srcdir)/qemu_dispatch.h - if WITH_LIBVIRTD =20 -# Build a convenience library, for reuse in tests/libvirtdconftest -noinst_LTLIBRARIES =3D libvirtd_conf.la -libvirtd_conf_la_SOURCES =3D $(LIBVIRTD_CONF_SOURCES) -libvirtd_conf_la_CFLAGS =3D \ - $(LIBXML_CFLAGS) \ - $(XDR_CFLAGS) \ - $(WARN_CFLAGS) $(PIE_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) -libvirtd_conf_la_LDFLAGS =3D \ - $(RELRO_LDFLAGS) \ - $(PIE_LDFLAGS) \ - $(COVERAGE_LDFLAGS) \ - $(NO_INDIRECT_LDFLAGS) \ - $(NO_UNDEFINED_LDFLAGS) \ - $(NULL) -libvirtd_conf_la_LIBADD =3D $(LIBXML_LIBS) - man8_MANS =3D libvirtd.8 =20 -sbin_PROGRAMS =3D libvirtd - confdir =3D $(sysconfdir)/libvirt/ conf_DATA =3D libvirtd.conf =20 @@ -144,44 +67,6 @@ augeastests_DATA =3D test_libvirtd.aug =20 CLEANFILES +=3D test_libvirtd.aug =20 -libvirtd_SOURCES =3D $(DAEMON_SOURCES) - -#-D_XOPEN_SOURCE=3D600 -D_XOPEN_SOURCE_EXTENDED=3D1 -D_POSIX_C_SOURCE=3D19= 9506L -libvirtd_CFLAGS =3D \ - $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \ - $(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \ - $(WARN_CFLAGS) $(PIE_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - -DQEMUD_PID_FILE=3D"\"$(QEMUD_PID_FILE)\"" - -libvirtd_LDFLAGS =3D \ - $(RELRO_LDFLAGS) \ - $(PIE_LDFLAGS) \ - $(COVERAGE_LDFLAGS) \ - $(NO_INDIRECT_LDFLAGS) \ - $(NO_UNDEFINED_LDFLAGS) \ - $(NULL) - -libvirtd_LDADD =3D \ - $(LIBXML_LIBS) \ - $(GNUTLS_LIBS) \ - $(SASL_LIBS) \ - $(DBUS_LIBS) \ - $(LIBNL_LIBS) - -if WITH_DTRACE_PROBES -libvirtd_LDADD +=3D ../src/libvirt_probes.lo -endif WITH_DTRACE_PROBES - -libvirtd_LDADD +=3D \ - libvirtd_conf.la \ - ../src/libvirt_driver_admin.la \ - ../src/libvirt-lxc.la \ - ../src/libvirt-qemu.la \ - $(NULL) - -libvirtd_LDADD +=3D ../src/libvirt.la - if WITH_POLKIT if WITH_POLKIT0 policydir =3D $(datadir)/PolicyKit/policy @@ -239,9 +124,6 @@ install-data-polkit:: uninstall-data-polkit:: endif ! WITH_POLKIT =20 -remote.c: $(DAEMON_GENERATED) -remote.h: $(DAEMON_GENERATED) - LOGROTATE_CONFS =3D libvirtd.qemu.logrotate libvirtd.lxc.logrotate \ libvirtd.libxl.logrotate libvirtd.uml.logrotate \ libvirtd.logrotate @@ -414,11 +296,6 @@ check-augeas: test_libvirtd.aug '$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \ fi =20 - -# This must be added last, since functions it provides/replaces -# are used by nearly every other library. -libvirtd_LDADD +=3D ../gnulib/lib/libgnu.la $(LIBSOCKET) - else ! WITH_LIBVIRTD install-data-local: install-data-sasl uninstall-local:: uninstall-data-sasl @@ -462,4 +339,4 @@ endif ! WITH_SASL =20 CLEANFILES +=3D $(BUILT_SOURCES) $(man8_MANS) CLEANFILES +=3D *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda -MAINTAINERCLEANFILES =3D $(MANINFILES) $(DAEMON_GENERATED) +MAINTAINERCLEANFILES =3D $(MANINFILES) diff --git a/src/Makefile.am b/src/Makefile.am index bb51be50d7..a1e5fa573e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -85,6 +85,7 @@ lib_LTLIBRARIES =3D libvirt.la libvirt-qemu.la libvirt-lx= c.la =20 moddir =3D $(libdir)/libvirt/connection-driver mod_LTLIBRARIES =3D +sbin_PROGRAMS =3D =20 confdir =3D $(sysconfdir)/libvirt conf_DATA =3D libvirt.conf libvirt-admin.conf @@ -537,12 +538,45 @@ remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatc= h.pl \ qemu QEMU $(QEMU_PROTOCOL) \ > $(srcdir)/remote/qemu_client_bodies.h =20 +remote/remote_daemon_dispatch_stubs.h: $(top_srcdir)/src/rpc/gendispatch.p= l \ + $(REMOTE_PROTOCOL) Makefile.am + $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ + --mode=3Dserver remote REMOTE $(REMOTE_PROTOCOL) \ + > $(srcdir)/remote/remote_daemon_dispatch_stubs.h + +remote/remote_daemon_dispatch_lxc_stubs.h: $(top_srcdir)/src/rpc/gendispat= ch.pl \ + $(LXC_PROTOCOL) Makefile.am + $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ + --mode=3Dserver lxc LXC $(LXC_PROTOCOL) \ + > $(srcdir)/remote/remote_daemon_dispatch_lxc_stubs.h + +remote/remote_daemon_dispatch_qemu_stubs.h: $(top_srcdir)/src/rpc/gendispa= tch.pl \ + $(QEMU_PROTOCOL) Makefile.am + $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ + --mode=3Dserver qemu QEMU $(QEMU_PROTOCOL) \ + > $(srcdir)/remote/remote_daemon_dispatch_qemu_stubs.h + REMOTE_DRIVER_SOURCES =3D \ remote/remote_driver.c remote/remote_driver.h \ $(REMOTE_DRIVER_GENERATED) =20 +LIBVIRTD_GENERATED =3D \ + remote/remote_daemon_dispatch_stubs.h \ + remote/remote_daemon_dispatch_lxc_stubs.h \ + remote/remote_daemon_dispatch_qemu_stubs.h \ + $(NULL) + +LIBVIRTD_SOURCES =3D \ + remote/remote_daemon.c remote/remote_daemon.h \ + remote/remote_daemon_config.c remote/remote_daemon_config.h \ + remote/remote_daemon_dispatch.c remote/remote_daemon_dispatch.h \ + remote/remote_daemon_stream.c remote/remote_daemon_stream.h \ + $(LIBVIRTD_GENERATED) + EXTRA_DIST +=3D $(REMOTE_DRIVER_PROTOCOL) \ - $(REMOTE_DRIVER_GENERATED) + $(REMOTE_DRIVER_GENERATED) \ + $(LIBVIRTD_SOURCES) \ + $(NULL) =20 ADMIN_PROTOCOL =3D $(srcdir)/admin/admin_protocol.x =20 @@ -1329,6 +1363,55 @@ BUILT_SOURCES +=3D $(REMOTE_DRIVER_GENERATED) =20 endif WITH_REMOTE =20 + +if WITH_LIBVIRTD + +sbin_PROGRAMS +=3D libvirtd + +BUILT_SOURCES +=3D $(LIBVIRTD_GENERATED) + +libvirtd_SOURCES =3D $(LIBVIRTD_SOURCES) + +libvirtd_CFLAGS =3D \ + $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \ + $(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \ + $(WARN_CFLAGS) $(PIE_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + -I$(srcdir)/access \ + -I$(srcdir)/conf \ + -I$(srcdir)/rpc \ + $(NULL) + +libvirtd_LDFLAGS =3D \ + $(RELRO_LDFLAGS) \ + $(PIE_LDFLAGS) \ + $(COVERAGE_LDFLAGS) \ + $(NO_INDIRECT_LDFLAGS) \ + $(NO_UNDEFINED_LDFLAGS) \ + $(NULL) + +libvirtd_LDADD =3D \ + $(LIBXML_LIBS) \ + $(GNUTLS_LIBS) \ + $(SASL_LIBS) \ + $(DBUS_LIBS) \ + $(LIBNL_LIBS) \ + $(NULL) + +if WITH_DTRACE_PROBES +libvirtd_LDADD +=3D ../src/libvirt_probes.lo +endif WITH_DTRACE_PROBES + +libvirtd_LDADD +=3D \ + libvirt_driver_admin.la \ + libvirt-lxc.la \ + libvirt-qemu.la \ + libvirt.la \ + ../gnulib/lib/libgnu.la $(LIBSOCKET) \ + $(NULL) + +endif WITH_LIBVIRTD + %protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ $< $(srcdir)/$(subst $(srcdir)/,,$@) @@ -2620,7 +2703,7 @@ locking/%-lockd.conf: $(srcdir)/locking/lockd.conf cp $< $@ =20 =20 -sbin_PROGRAMS =3D virtlockd virtlogd +sbin_PROGRAMS +=3D virtlockd virtlogd =20 virtlockd_SOURCES =3D \ $(LOCK_DAEMON_SOURCES) \ @@ -3368,4 +3451,8 @@ endif WITH_NETWORK =20 CLEANFILES +=3D *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s DISTCLEANFILES +=3D $(GENERATED_SYM_FILES) -MAINTAINERCLEANFILES +=3D $(REMOTE_DRIVER_GENERATED) $(VIR_NET_RPC_GENERAT= ED) +MAINTAINERCLEANFILES +=3D \ + $(REMOTE_DRIVER_GENERATED) \ + $(LIBVIRTD_GENERATED) \ + $(VIR_NET_RPC_GENERATED) \ + $(NULL) diff --git a/daemon/libvirtd.c b/src/remote/remote_daemon.c similarity index 99% rename from daemon/libvirtd.c rename to src/remote/remote_daemon.c index c5bb12b8ce..a452c72b59 100644 --- a/daemon/libvirtd.c +++ b/src/remote/remote_daemon.c @@ -1,7 +1,7 @@ /* - * libvirtd.c: daemon start of day, guest process & i/o management + * remote_daemon.c: daemon start of day, guest process & i/o management * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -40,8 +40,8 @@ =20 #define VIR_FROM_THIS VIR_FROM_QEMU =20 -#include "libvirtd.h" -#include "libvirtd-config.h" +#include "remote_daemon.h" +#include "remote_daemon_config.h" =20 #include "admin/admin_server_dispatch.h" #include "viruuid.h" @@ -50,7 +50,7 @@ #include "virconf.h" #include "virnetlink.h" #include "virnetdaemon.h" -#include "remote.h" +#include "remote_daemon_dispatch.h" #include "virhook.h" #include "viraudit.h" #include "virstring.h" diff --git a/daemon/libvirtd.h b/src/remote/remote_daemon.h similarity index 93% rename from daemon/libvirtd.h rename to src/remote/remote_daemon.h index 082c4bc4df..4467f71da9 100644 --- a/daemon/libvirtd.h +++ b/src/remote/remote_daemon.h @@ -1,7 +1,7 @@ /* - * libvirtd.h: daemon data structure definitions + * remote_daemon.h: daemon data structure definitions * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -22,8 +22,8 @@ */ =20 =20 -#ifndef LIBVIRTD_H__ -# define LIBVIRTD_H__ +#ifndef __REMOTE_DAEMON_H__ +# define __REMOTE_DAEMON_H__ =20 # define VIR_ENUM_SENTINELS =20 @@ -85,4 +85,4 @@ extern virNetSASLContextPtr saslCtxt; extern virNetServerProgramPtr remoteProgram; extern virNetServerProgramPtr qemuProgram; =20 -#endif +#endif /* __REMOTE_DAEMON_H__ */ diff --git a/daemon/libvirtd-config.c b/src/remote/remote_daemon_config.c similarity index 98% rename from daemon/libvirtd-config.c rename to src/remote/remote_daemon_config.c index 19b3d168ea..2317115b82 100644 --- a/daemon/libvirtd-config.c +++ b/src/remote/remote_daemon_config.c @@ -1,7 +1,7 @@ /* - * libvirtd-config.c: daemon start of day, guest process & i/o management + * remote_daemon_config.h: libvirtd config file handling * - * Copyright (C) 2006-2012, 2014, 2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -23,15 +23,15 @@ =20 #include =20 -#include "libvirtd-config.h" +#include "remote_daemon_config.h" #include "virconf.h" #include "viralloc.h" #include "virerror.h" #include "virlog.h" #include "rpc/virnetserver.h" #include "configmake.h" -#include "remote/remote_protocol.h" -#include "remote/remote_driver.h" +#include "remote_protocol.h" +#include "remote_driver.h" #include "util/virnetdevopenvswitch.h" #include "virstring.h" #include "virutil.h" diff --git a/daemon/libvirtd-config.h b/src/remote/remote_daemon_config.h similarity index 92% rename from daemon/libvirtd-config.h rename to src/remote/remote_daemon_config.h index d618c96608..49ea80104b 100644 --- a/daemon/libvirtd-config.h +++ b/src/remote/remote_daemon_config.h @@ -1,7 +1,7 @@ /* - * libvirtd-config.h: daemon start of day, guest process & i/o management + * remote_daemon_config.h: libvirtd config file handling * - * Copyright (C) 2006-2012, 2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -21,8 +21,8 @@ * Author: Daniel P. Berrange */ =20 -#ifndef __LIBVIRTD_CONFIG_H__ -# define __LIBVIRTD_CONFIG_H__ +#ifndef __REMOTE_DAEMON_CONFIG_H__ +# define __REMOTE_DAEMON_CONFIG_H__ =20 # include "internal.h" =20 @@ -106,4 +106,4 @@ int daemonConfigLoadData(struct daemonConfig *data, const char *filename, const char *filedata); =20 -#endif /* __LIBVIRTD_CONFIG_H__ */ +#endif /* __REMOTE_DAEMON_CONFIG_H__ */ diff --git a/daemon/remote.c b/src/remote/remote_daemon_dispatch.c similarity index 99% rename from daemon/remote.c rename to src/remote/remote_daemon_dispatch.c index 6de4bd00d4..fdb0a362e4 100644 --- a/daemon/remote.c +++ b/src/remote/remote_daemon_dispatch.c @@ -1,7 +1,7 @@ /* - * remote.c: handlers for RPC method calls + * remote_daemon_dispatch.c: handlers for RPC method calls * - * Copyright (C) 2007-2015 Red Hat, Inc. + * Copyright (C) 2007-2018 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,13 +24,13 @@ =20 #include "virerror.h" =20 -#include "remote.h" -#include "libvirtd.h" +#include "remote_daemon_dispatch.h" +#include "remote_daemon.h" #include "libvirt_internal.h" #include "datatypes.h" #include "viralloc.h" #include "virlog.h" -#include "stream.h" +#include "remote_daemon_stream.h" #include "viruuid.h" #include "vircommand.h" #include "intprops.h" @@ -108,9 +108,9 @@ remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr e= rrors, remote_domain_disk_error **ret_errors_val, u_int *ret_errors_len); =20 -#include "remote_dispatch.h" -#include "qemu_dispatch.h" -#include "lxc_dispatch.h" +#include "remote_daemon_dispatch_stubs.h" +#include "remote_daemon_dispatch_qemu_stubs.h" +#include "remote_daemon_dispatch_lxc_stubs.h" =20 =20 /* Prototypes */ diff --git a/daemon/remote.h b/src/remote/remote_daemon_dispatch.h similarity index 85% rename from daemon/remote.h rename to src/remote/remote_daemon_dispatch.h index c1bce9ba2e..015ab977fc 100644 --- a/daemon/remote.h +++ b/src/remote/remote_daemon_dispatch.h @@ -1,7 +1,7 @@ /* - * remote.h: handlers for RPC method calls + * remote_daemon_dispatch.h: handlers for RPC method calls * - * Copyright (C) 2007, 2008, 2009 Red Hat, Inc. + * Copyright (C) 2007-2018 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,8 +21,8 @@ * Author: Daniel P. Berrange */ =20 -#ifndef __LIBVIRTD_REMOTE_H__ -# define __LIBVIRTD_REMOTE_H__ +#ifndef __REMOTE_DAEMON_DISPATCH_H__ +# define __REMOTE_DAEMON_DISPATCH_H__ =20 # include "remote_protocol.h" # include "rpc/virnetserverprogram.h" @@ -42,4 +42,4 @@ void remoteClientFree(void *data); void *remoteClientNew(virNetServerClientPtr client, void *opaque); =20 -#endif /* __LIBVIRTD_REMOTE_H__ */ +#endif /* __REMOTE_DAEMON_DISPATCH_H__ */ diff --git a/daemon/stream.c b/src/remote/remote_daemon_stream.c similarity index 99% rename from daemon/stream.c rename to src/remote/remote_daemon_stream.c index 49682f1145..4dd3af9e0d 100644 --- a/daemon/stream.c +++ b/src/remote/remote_daemon_stream.c @@ -1,7 +1,7 @@ /* - * stream.c: APIs for managing client streams + * remote_daemon_stream.c: APIs for managing client streams * - * Copyright (C) 2009-2014 Red Hat, Inc. + * Copyright (C) 2009-2018 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ =20 #include =20 -#include "stream.h" -#include "remote.h" +#include "remote_daemon_stream.h" +#include "remote_daemon_dispatch.h" #include "viralloc.h" #include "virlog.h" #include "virnetserverclient.h" diff --git a/daemon/stream.h b/src/remote/remote_daemon_stream.h similarity index 85% rename from daemon/stream.h rename to src/remote/remote_daemon_stream.h index e1f1067595..832e1f7547 100644 --- a/daemon/stream.h +++ b/src/remote/remote_daemon_stream.h @@ -1,7 +1,7 @@ /* - * stream.h: APIs for managing client streams + * remote_daemon_stream.h: APIs for managing client streams * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009-2018 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,10 +21,10 @@ */ =20 =20 -#ifndef __LIBVIRTD_STREAM_H__ -# define __LIBVIRTD_STREAM_H__ +#ifndef __REMOTE_DAEMON_STREAM_H__ +# define __REMOTE_DAEMON_STREAM_H__ =20 -# include "libvirtd.h" +# include "remote_daemon.h" =20 daemonClientStream * daemonCreateClientStream(virNetServerClientPtr client, @@ -47,4 +47,4 @@ daemonRemoveClientStream(virNetServerClientPtr client, void daemonRemoveAllClientStreams(daemonClientStream *stream); =20 -#endif /* __LIBVIRTD_STREAM_H__ */ +#endif /* __REMOTE_DAEMON_STREAM_H__ */ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 151922735141180.34157674792073; Wed, 21 Feb 2018 07:35:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A2D35A72; Wed, 21 Feb 2018 15:35:49 +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 5545F5D968; Wed, 21 Feb 2018 15:35:49 +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 1DA594A475; Wed, 21 Feb 2018 15:35:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZb6o020967 for ; Wed, 21 Feb 2018 10:35:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 97D9B10A9713; Wed, 21 Feb 2018 15:35:37 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id C14B610A9711; Wed, 21 Feb 2018 15:35:36 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:21 +0000 Message-Id: <20180221153525.14973-7-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/10] daemon: move libvirtd POD manpage into src/remote/ 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 21 Feb 2018 15:35:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Daniel P. Berrang=C3=A9 --- daemon/Makefile.am | 34 +--------------------------------- src/Makefile.am | 14 +++++++++++++- {daemon =3D> src/remote}/libvirtd.pod | 0 3 files changed, 14 insertions(+), 34 deletions(-) rename {daemon =3D> src/remote}/libvirtd.pod (100%) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 4f682fa740..012aced9c9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -18,14 +18,6 @@ =20 CLEANFILES =3D =20 -PODFILES =3D \ - libvirtd.pod \ - $(NULL) - -MANINFILES =3D \ - libvirtd.8.in \ - $(NULL) - DISTCLEANFILES =3D EXTRA_DIST =3D \ libvirtd.conf \ @@ -46,16 +38,12 @@ EXTRA_DIST =3D \ libvirtd.uml.logrotate.in \ test_libvirtd.aug.in \ THREADS.txt \ - $(PODFILES) \ - $(MANINFILES) \ $(NULL) =20 BUILT_SOURCES =3D =20 if WITH_LIBVIRTD =20 -man8_MANS =3D libvirtd.8 - confdir =3D $(sysconfdir)/libvirt/ conf_DATA =3D libvirtd.conf =20 @@ -301,25 +289,6 @@ install-data-local: install-data-sasl uninstall-local:: uninstall-data-sasl endif ! WITH_LIBVIRTD =20 -POD2MAN =3D pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" - -%.8.in: %.pod - $(AM_V_GEN)$(POD2MAN) --section=3D8 $< $@-t1 && \ - if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \ - sed \ - -e 's|SYSCONFDIR|\@sysconfdir\@|g' \ - -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \ - < $@-t1 > $@-t2 && \ - rm -f $@-t1 && \ - mv $@-t2 $@ - -%.8: %.8.in $(top_srcdir)/configure.ac - $(AM_V_GEN)sed \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - # This is needed for clients too, so can't wrap in # the WITH_LIBVIRTD conditional if WITH_SASL @@ -337,6 +306,5 @@ uninstall-data-sasl: endif ! WITH_SASL =20 =20 -CLEANFILES +=3D $(BUILT_SOURCES) $(man8_MANS) +CLEANFILES +=3D $(BUILT_SOURCES) CLEANFILES +=3D *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda -MAINTAINERCLEANFILES =3D $(MANINFILES) diff --git a/src/Makefile.am b/src/Makefile.am index a1e5fa573e..ff22e1f7ea 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2863,6 +2863,16 @@ virtlogd.8.in: logging/virtlogd.pod rm -f $@-t1 && \ mv $@-t2 $@ =20 +libvirtd.8.in: remote/libvirtd.pod + $(AM_V_GEN)$(POD2MAN) --section=3D8 $< $@-t1 && \ + if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \ + sed \ + -e 's|SYSCONFDIR|\@sysconfdir\@|g' \ + -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \ + < $@-t1 > $@-t2 && \ + rm -f $@-t1 && \ + mv $@-t2 $@ + %.8: %.8.in $(top_srcdir)/configure.ac $(AM_V_GEN)sed \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ @@ -2871,7 +2881,7 @@ virtlogd.8.in: logging/virtlogd.pod mv $@-t $@ =20 if WITH_LIBVIRTD -man8_MANS =3D virtlockd.8 virtlogd.8 +man8_MANS =3D virtlockd.8 virtlogd.8 libvirtd.8 =20 conf_DATA +=3D locking/virtlockd.conf logging/virtlogd.conf =20 @@ -2882,11 +2892,13 @@ endif WITH_LIBVIRTD PODFILES =3D \ locking/virtlockd.pod \ logging/virtlogd.pod \ + remote/libvirtd.pod \ $(NULL) =20 MANINFILES =3D \ virtlockd.8.in \ virtlogd.8.in \ + libvirtd.8.in \ $(NULL) =20 CLEANFILES +=3D test_virtlockd.aug test_virtlogd.aug $(man8_MANS) diff --git a/daemon/libvirtd.pod b/src/remote/libvirtd.pod similarity index 100% rename from daemon/libvirtd.pod rename to src/remote/libvirtd.pod --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227354168792.6570169662926; Wed, 21 Feb 2018 07:35:54 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3F8BA84E; Wed, 21 Feb 2018 15:35:52 +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 7CECB608F9; Wed, 21 Feb 2018 15:35:52 +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 3F43E4A47C; Wed, 21 Feb 2018 15:35:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZc6e020978 for ; Wed, 21 Feb 2018 10:35:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id A234C10A9717; Wed, 21 Feb 2018 15:35:38 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id E520E10A9711; Wed, 21 Feb 2018 15:35:37 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:22 +0000 Message-Id: <20180221153525.14973-8-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/10] daemon: move init system files into src/remote/ 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 21 Feb 2018 15:35:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Move the systemd, sysvinit, upstart and sysconfig files into the src/remote/ directory. Signed-off-by: Daniel P. Berrang=C3=A9 --- .gitignore | 1 + daemon/Makefile.am | 94 +-----------------= ---- src/Makefile.am | 61 +++++++++++++- {daemon =3D> src/remote}/libvirtd.init.in | 0 {daemon =3D> src/remote}/libvirtd.service.in | 0 {daemon =3D> src/remote}/libvirtd.sysconf | 0 {daemon =3D> src/remote}/libvirtd.upstart | 0 .../remote/virt-guest-shutdown.target.in | 0 8 files changed, 62 insertions(+), 94 deletions(-) rename {daemon =3D> src/remote}/libvirtd.init.in (100%) rename {daemon =3D> src/remote}/libvirtd.service.in (100%) rename {daemon =3D> src/remote}/libvirtd.sysconf (100%) rename {daemon =3D> src/remote}/libvirtd.upstart (100%) rename daemon/virt-guest-shutdown.target =3D> src/remote/virt-guest-shutdo= wn.target.in (100%) diff --git a/.gitignore b/.gitignore index 415d6d166b..7ff6cec2f9 100644 --- a/.gitignore +++ b/.gitignore @@ -169,6 +169,7 @@ /src/virt-aa-helper /src/virtlockd /src/virtlogd +/src/virt-guest-shutdown.target /tests/*.log /tests/*.pid /tests/*.trs diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 012aced9c9..70de285667 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -21,14 +21,9 @@ CLEANFILES =3D DISTCLEANFILES =3D EXTRA_DIST =3D \ libvirtd.conf \ - libvirtd.init.in \ - libvirtd.upstart \ libvirtd.policy.in \ libvirt.rules \ libvirtd.sasl \ - libvirtd.service.in \ - virt-guest-shutdown.target \ - libvirtd.sysconf \ libvirtd.sysctl \ libvirtd.aug \ libvirtd.logrotate.in \ @@ -74,17 +69,13 @@ libvirtd.policy: libvirtd.policy.in $(top_builddir)/con= fig.status mv $@-t $@ BUILT_SOURCES +=3D libvirtd.policy =20 -install-data-local: install-init-redhat install-init-systemd \ - install-init-upstart \ - install-data-sasl install-data-polkit \ +install-data-local: install-data-sasl install-data-polkit \ install-logrotate install-sysctl $(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \ $(DESTDIR)$(localstatedir)/run/libvirt \ $(DESTDIR)$(localstatedir)/lib/libvirt =20 -uninstall-local:: uninstall-init-redhat uninstall-init-systemd \ - uninstall-init-upstart \ - uninstall-data-sasl uninstall-data-polkit \ +uninstall-local:: uninstall-data-sasl uninstall-data-polkit \ uninstall-logrotate uninstall-sysctl rmdir $(DESTDIR)$(localstatedir)/log/libvirt || : rmdir $(DESTDIR)$(localstatedir)/run/libvirt || : @@ -175,14 +166,6 @@ uninstall-logrotate: rmdir $(DESTDIR)$(localstatedir)/log/libvirt/uml || : rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || : =20 -install-sysconfig: - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig - $(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \ - $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd -uninstall-sysconfig: - rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd - rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : - if WITH_SYSCTL # Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on # /usr/lib/sysctl.d/ even when libdir is /usr/lib64 @@ -199,79 +182,6 @@ install-sysctl: uninstall-sysctl: endif ! WITH_SYSCTL =20 -if LIBVIRT_INIT_SCRIPT_RED_HAT - -BUILT_SOURCES +=3D libvirtd.init - -install-init-redhat: install-sysconfig libvirtd.init - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d - $(INSTALL_SCRIPT) libvirtd.init \ - $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd - -uninstall-init-redhat: uninstall-sysconfig - rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd - rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || : -else ! LIBVIRT_INIT_SCRIPT_RED_HAT -install-init-redhat: -uninstall-init-redhat: -endif ! LIBVIRT_INIT_SCRIPT_RED_HAT - - -if LIBVIRT_INIT_SCRIPT_UPSTART - -install-init-upstart: install-sysconfig - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d - $(INSTALL_SCRIPT) libvirtd.upstart \ - $(DESTDIR)$(sysconfdir)/event.d/libvirtd - -uninstall-init-upstart: uninstall-sysconfig - rm -f $(DESTDIR)$(sysconfdir)/event.d/libvirtd - rmdir $(DESTDIR)$(sysconfdir)/event.d || : -else ! LIBVIRT_INIT_SCRIPT_UPSTART -install-init-upstart: -uninstall-init-upstart: -endif ! LIBVIRT_INIT_SCRIPT_UPSTART - - -if LIBVIRT_INIT_SCRIPT_SYSTEMD - -SYSTEMD_UNIT_DIR =3D $(prefix)/lib/systemd/system -BUILT_SOURCES +=3D libvirtd.service - -install-init-systemd: install-sysconfig libvirtd.service - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - $(INSTALL_DATA) libvirtd.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service - $(INSTALL_DATA) $(srcdir)/virt-guest-shutdown.target \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virt-guest-shutdown.target - -uninstall-init-systemd: uninstall-sysconfig - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virt-guest-shutdown.target - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : -else ! LIBVIRT_INIT_SCRIPT_SYSTEMD -install-init-systemd: -uninstall-init-systemd: -endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD - -libvirtd.init: libvirtd.init.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 && \ - chmod a+x $@-t && \ - mv $@-t $@ - -libvirtd.service: 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 $@ - - check-local: check-augeas =20 AUG_GENTEST =3D $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl diff --git a/src/Makefile.am b/src/Makefile.am index ff22e1f7ea..8988872ce3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2769,6 +2769,7 @@ endif ! WITH_LIBVIRTD SYSCONF_FILES =3D \ locking/virtlockd.sysconf \ logging/virtlogd.sysconf \ + remote/libvirtd.sysconf \ $(NULL) =20 EXTRA_DIST +=3D \ @@ -2795,6 +2796,7 @@ uninstall-sysconfig: SYSVINIT_FILES_IN =3D \ locking/virtlockd.init.in \ logging/virtlogd.init.in \ + remote/libvirtd.init.in \ $(NULL) =20 SYSVINIT_FILES =3D $(notdir $(SYSVINIT_FILES_IN:%.in=3D%)) @@ -2825,6 +2827,15 @@ install-init:: uninstall-init:: endif ! WITH_LIBVIRTD =20 +libvirtd.init: remote/libvirtd.init.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 && \ + chmod a+x $@-t && \ + mv $@-t $@ + virtlockd.init: locking/virtlockd.init.in $(top_builddir)/config.status $(AM_V_GEN)sed \ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ @@ -2911,6 +2922,8 @@ SYSTEMD_UNIT_FILES_IN =3D \ logging/virtlogd.service.in \ logging/virtlogd.socket.in \ logging/virtlogd-admin.socket.in \ + remote/libvirtd.service.in \ + remote/virt-guest-shutdown.target.in \ $(NULL) =20 EXTRA_DIST +=3D \ @@ -2954,6 +2967,17 @@ install-systemd: uninstall-systemd: endif ! WITH_LIBVIRTD =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 $@ + +virt-guest-shutdown.target: remote/virt-guest-shutdown.target.in $(top_bui= lddir)/config.status + $(AM_V_GEN)cp $< $@ + virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.sta= tus $(AM_V_GEN)sed \ -e 's|[@]sbindir[@]|$(sbindir)|g' \ @@ -2993,6 +3017,39 @@ virtlogd-admin.socket: logging/virtlogd-admin.socket= .in \ mv $@-t $@ =20 =20 +UPSTART_FILES =3D \ + remote/libvirtd.upstart \ + $(NULL) + +EXTRA_DIST +=3D $(UPSTART_FILES) + +if WITH_LIBVIRTD +if LIBVIRT_INIT_SCRIPT_UPSTART + +install-upstart: install-sysconfig + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d + for f in $(UPSTART_FILES:%.upstart=3D%); \ + do \ + tgt=3D`basename $$f` ; \ + $(INSTALL_SCRIPT) $$f.upstart $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \ + done + +uninstall-upstart: uninstall-sysconfig + for f in $(UPSTART_FILES:%.upstart=3D%); \ + do \ + tgt=3D`basename $$f` ; \ + rm -f $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \ + done + rmdir $(DESTDIR)$(sysconfdir)/event.d || : +else ! LIBVIRT_INIT_SCRIPT_UPSTART +install-upstart: +uninstall-upstart: +endif ! LIBVIRT_INIT_SCRIPT_UPSTART +else ! WITH_LIBVIRTD +install-upstart: +uninstall-upstart: +endif ! WITH_LIBVIRTD + if WITH_SANLOCK lockdriver_LTLIBRARIES +=3D sanlock.la sanlock_la_SOURCES =3D $(LOCK_DRIVER_SANLOCK_SOURCES) @@ -3361,7 +3418,7 @@ libvirt_nss_la_LIBADD =3D \ endif WITH_NSS =20 =20 -install-data-local: install-init install-systemd +install-data-local: install-init install-systemd install-upstart if WITH_LIBVIRTD $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" @@ -3416,7 +3473,7 @@ if WITH_NETWORK $(LN_S) ../default.xml default.xml ) endif WITH_NETWORK =20 -uninstall-local:: uninstall-init uninstall-systemd +uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart if WITH_LIBVIRTD rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" ||: rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" ||: diff --git a/daemon/libvirtd.init.in b/src/remote/libvirtd.init.in similarity index 100% rename from daemon/libvirtd.init.in rename to src/remote/libvirtd.init.in diff --git a/daemon/libvirtd.service.in b/src/remote/libvirtd.service.in similarity index 100% rename from daemon/libvirtd.service.in rename to src/remote/libvirtd.service.in diff --git a/daemon/libvirtd.sysconf b/src/remote/libvirtd.sysconf similarity index 100% rename from daemon/libvirtd.sysconf rename to src/remote/libvirtd.sysconf diff --git a/daemon/libvirtd.upstart b/src/remote/libvirtd.upstart similarity index 100% rename from daemon/libvirtd.upstart rename to src/remote/libvirtd.upstart diff --git a/daemon/virt-guest-shutdown.target b/src/remote/virt-guest-shut= down.target.in similarity index 100% rename from daemon/virt-guest-shutdown.target rename to src/remote/virt-guest-shutdown.target.in --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227357517186.15907328648996; Wed, 21 Feb 2018 07:35:57 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 375FB15565; Wed, 21 Feb 2018 15:35:56 +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 F10E65D75D; Wed, 21 Feb 2018 15:35:55 +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 B2E07181A881; Wed, 21 Feb 2018 15:35:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZdwr020991 for ; Wed, 21 Feb 2018 10:35:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id BEE2D10A9717; Wed, 21 Feb 2018 15:35:39 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 133F310A9711; Wed, 21 Feb 2018 15:35:38 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:23 +0000 Message-Id: <20180221153525.14973-9-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/10] daemon: move configuration files to src/remote 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 21 Feb 2018 15:35:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Daniel P. Berrang=C3=A9 --- daemon/Makefile.am | 26 -------------------------- src/Makefile.am | 24 +++++++++++++++++++++++- {daemon =3D> src/remote}/libvirtd.aug | 0 {daemon =3D> src/remote}/libvirtd.conf | 0 {daemon =3D> src/remote}/test_libvirtd.aug.in | 0 5 files changed, 23 insertions(+), 27 deletions(-) rename {daemon =3D> src/remote}/libvirtd.aug (100%) rename {daemon =3D> src/remote}/libvirtd.conf (100%) rename {daemon =3D> src/remote}/test_libvirtd.aug.in (100%) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 70de285667..8bac9a550b 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -20,18 +20,15 @@ CLEANFILES =3D =20 DISTCLEANFILES =3D EXTRA_DIST =3D \ - libvirtd.conf \ libvirtd.policy.in \ libvirt.rules \ libvirtd.sasl \ libvirtd.sysctl \ - libvirtd.aug \ libvirtd.logrotate.in \ libvirtd.qemu.logrotate.in \ libvirtd.lxc.logrotate.in \ libvirtd.libxl.logrotate.in \ libvirtd.uml.logrotate.in \ - test_libvirtd.aug.in \ THREADS.txt \ $(NULL) =20 @@ -39,17 +36,6 @@ BUILT_SOURCES =3D =20 if WITH_LIBVIRTD =20 -confdir =3D $(sysconfdir)/libvirt/ -conf_DATA =3D libvirtd.conf - -augeasdir =3D $(datadir)/augeas/lenses -augeas_DATA =3D libvirtd.aug - -augeastestsdir =3D $(datadir)/augeas/lenses/tests -augeastests_DATA =3D test_libvirtd.aug - -CLEANFILES +=3D test_libvirtd.aug - if WITH_POLKIT if WITH_POLKIT0 policydir =3D $(datadir)/PolicyKit/policy @@ -182,18 +168,6 @@ install-sysctl: uninstall-sysctl: endif ! WITH_SYSCTL =20 -check-local: check-augeas - -AUG_GENTEST =3D $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl - -test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf - $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.conf $< $@ - -check-augeas: test_libvirtd.aug - $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \ - fi - else ! WITH_LIBVIRTD install-data-local: install-data-sasl uninstall-local:: uninstall-data-sasl diff --git a/src/Makefile.am b/src/Makefile.am index 8988872ce3..e777fcce09 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1370,6 +1370,14 @@ sbin_PROGRAMS +=3D libvirtd =20 BUILT_SOURCES +=3D $(LIBVIRTD_GENERATED) =20 +augeas_DATA +=3D remote/libvirtd.aug + +augeastest_DATA +=3D test_libvirtd.aug + +conf_DATA +=3D remote/libvirtd.conf + +CLEANFILES +=3D tets_libvirtd.aug + libvirtd_SOURCES =3D $(LIBVIRTD_SOURCES) =20 libvirtd_CFLAGS =3D \ @@ -1411,6 +1419,7 @@ libvirtd_LDADD +=3D \ $(NULL) =20 endif WITH_LIBVIRTD +EXTRA_DIST +=3D remote/test_libvirtd.aug.in remote/libvirtd.aug remote/lib= virtd.conf =20 %protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ @@ -2149,11 +2158,12 @@ check-local: check-augeas check-augeas-lockd \ check-augeas-libxl \ check-augeas-bhyve \ + check-augeas-libvirtd \ $(NULL) =20 check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock \ check-augeas-lockd check-augeas-virtlockd check-augeas-libxl \ - check-augeas-bhyve check-augeas-virtlogd + check-augeas-bhyve check-augeas-virtlogd check-augeas-libvirtd =20 AUG_GENTEST =3D $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl EXTRA_DIST +=3D $(top_srcdir)/build-aux/augeas-gentest.pl @@ -2258,6 +2268,18 @@ check-augeas-virtlogd: test_virtlogd.aug '$(AUGPARSE)' -I $(srcdir)/logging test_virtlogd.aug; \ fi =20 +if WITH_LIBVIRTD +test_libvirtd.aug: remote/test_libvirtd.aug.in \ + remote/libvirtd.conf $(AUG_GENTEST) + $(AM_V_GEN)$(AUG_GENTEST) remote/libvirtd.conf $< $@ + +check-augeas-libvirtd: test_libvirtd.aug + $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ + '$(AUGPARSE)' -I $(srcdir)/remote test_libvirtd.aug; \ + fi +else ! WITH_LIBVIRTD +check-augeas-libvirtd: +endif ! WITH_LIBVIRTD # # Build our version script. This is composed of three parts: # diff --git a/daemon/libvirtd.aug b/src/remote/libvirtd.aug similarity index 100% rename from daemon/libvirtd.aug rename to src/remote/libvirtd.aug diff --git a/daemon/libvirtd.conf b/src/remote/libvirtd.conf similarity index 100% rename from daemon/libvirtd.conf rename to src/remote/libvirtd.conf diff --git a/daemon/test_libvirtd.aug.in b/src/remote/test_libvirtd.aug.in similarity index 100% rename from daemon/test_libvirtd.aug.in rename to src/remote/test_libvirtd.aug.in --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227361470913.2705251030085; Wed, 21 Feb 2018 07:36:01 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A909B6E764; Wed, 21 Feb 2018 15:35:59 +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 74F795D98E; Wed, 21 Feb 2018 15:35:59 +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 3C00B4A47D; Wed, 21 Feb 2018 15:35:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZeew021000 for ; Wed, 21 Feb 2018 10:35:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id ABAFD10A9713; Wed, 21 Feb 2018 15:35:40 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 112F710A9711; Wed, 21 Feb 2018 15:35:39 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:24 +0000 Message-Id: <20180221153525.14973-10-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/10] daemon: move misc libvirtd policy files to src/remote/ 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 21 Feb 2018 15:36:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Daniel P. Berrang=C3=A9 --- daemon/Makefile.am | 87 ++-----------------= -- src/Makefile.am | 92 +++++++++++++++++++= +++- {daemon =3D> src/remote}/libvirtd.policy.in | 0 daemon/libvirt.rules =3D> src/remote/libvirtd.rules | 0 {daemon =3D> src/remote}/libvirtd.sasl | 0 {daemon =3D> src/remote}/libvirtd.sysctl | 0 6 files changed, 94 insertions(+), 85 deletions(-) rename {daemon =3D> src/remote}/libvirtd.policy.in (100%) rename daemon/libvirt.rules =3D> src/remote/libvirtd.rules (100%) rename {daemon =3D> src/remote}/libvirtd.sasl (100%) rename {daemon =3D> src/remote}/libvirtd.sysctl (100%) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 8bac9a550b..ab7faf3e66 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -20,10 +20,6 @@ CLEANFILES =3D =20 DISTCLEANFILES =3D EXTRA_DIST =3D \ - libvirtd.policy.in \ - libvirt.rules \ - libvirtd.sasl \ - libvirtd.sysctl \ libvirtd.logrotate.in \ libvirtd.qemu.logrotate.in \ libvirtd.lxc.logrotate.in \ @@ -36,59 +32,18 @@ BUILT_SOURCES =3D =20 if WITH_LIBVIRTD =20 -if WITH_POLKIT -if WITH_POLKIT0 -policydir =3D $(datadir)/PolicyKit/policy -policyauth =3D auth_admin_keep_session -else ! WITH_POLKIT0 -policydir =3D $(datadir)/polkit-1/actions -policyauth =3D auth_admin_keep -rulesdir =3D $(datadir)/polkit-1/rules.d -rulesfile =3D libvirt.rules -endif ! WITH_POLKIT0 -endif WITH_POLKIT - -libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status - $(AM_V_GEN) sed \ - -e 's|[@]authaction[@]|$(policyauth)|g' \ - < $< > $@-t && \ - mv $@-t $@ -BUILT_SOURCES +=3D libvirtd.policy =20 -install-data-local: install-data-sasl install-data-polkit \ - install-logrotate install-sysctl + +install-data-local: install-logrotate $(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \ $(DESTDIR)$(localstatedir)/run/libvirt \ $(DESTDIR)$(localstatedir)/lib/libvirt =20 -uninstall-local:: uninstall-data-sasl uninstall-data-polkit \ - uninstall-logrotate uninstall-sysctl +uninstall-local:: uninstall-logrotate rmdir $(DESTDIR)$(localstatedir)/log/libvirt || : rmdir $(DESTDIR)$(localstatedir)/run/libvirt || : rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || : =20 -if WITH_POLKIT -install-data-polkit:: - $(MKDIR_P) $(DESTDIR)$(policydir) - $(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.p= olicy -if ! WITH_POLKIT0 - $(MKDIR_P) $(DESTDIR)$(rulesdir) - $(INSTALL_DATA) $(srcdir)/$(rulesfile) $(DESTDIR)$(rulesdir)/50-libvirt.r= ules -endif ! WITH_POLKIT0 - -uninstall-data-polkit:: - rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy - rmdir $(DESTDIR)$(policydir) || : -if ! WITH_POLKIT0 - rm -f $(DESTDIR)$(rulesdir)/50-libvirt.rules - rmdir $(DESTDIR)$(rulesdir) || : -endif ! WITH_POLKIT0 - -else ! WITH_POLKIT -install-data-polkit:: -uninstall-data-polkit:: -endif ! WITH_POLKIT - LOGROTATE_CONFS =3D libvirtd.qemu.logrotate libvirtd.lxc.logrotate \ libvirtd.libxl.logrotate libvirtd.uml.logrotate \ libvirtd.logrotate @@ -152,43 +107,11 @@ uninstall-logrotate: rmdir $(DESTDIR)$(localstatedir)/log/libvirt/uml || : rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || : =20 -if WITH_SYSCTL -# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on -# /usr/lib/sysctl.d/ even when libdir is /usr/lib64 -install-sysctl: - $(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d - $(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \ - $(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf - -uninstall-sysctl: - rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf - rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || : -else ! WITH_SYSCTL -install-sysctl: -uninstall-sysctl: -endif ! WITH_SYSCTL - else ! WITH_LIBVIRTD -install-data-local: install-data-sasl -uninstall-local:: uninstall-data-sasl +install-data-local: +uninstall-local:: endif ! WITH_LIBVIRTD =20 -# This is needed for clients too, so can't wrap in -# the WITH_LIBVIRTD conditional -if WITH_SASL -install-data-sasl: - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/ - $(INSTALL_DATA) $(srcdir)/libvirtd.sasl \ - $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf - -uninstall-data-sasl: - rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf - rmdir $(DESTDIR)$(sysconfdir)/sasl2/ || : -else ! WITH_SASL -install-data-sasl: -uninstall-data-sasl: -endif ! WITH_SASL - =20 CLEANFILES +=3D $(BUILT_SOURCES) CLEANFILES +=3D *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda diff --git a/src/Makefile.am b/src/Makefile.am index e777fcce09..e1a883fa84 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1378,6 +1378,24 @@ conf_DATA +=3D remote/libvirtd.conf =20 CLEANFILES +=3D tets_libvirtd.aug =20 +if WITH_POLKIT +if WITH_POLKIT0 +policydir =3D $(datadir)/PolicyKit/policy +policyauth =3D auth_admin_keep_session +else ! WITH_POLKIT0 +policydir =3D $(datadir)/polkit-1/actions +policyauth =3D auth_admin_keep +endif ! WITH_POLKIT0 +endif WITH_POLKIT + +BUILT_SOURCES +=3D libvirtd.policy + +libvirtd.policy: remote/libvirtd.policy.in $(top_builddir)/config.status + $(AM_V_GEN) sed \ + -e 's|[@]authaction[@]|$(policyauth)|g' \ + < $< > $@-t && \ + mv $@-t $@ + libvirtd_SOURCES =3D $(LIBVIRTD_SOURCES) =20 libvirtd_CFLAGS =3D \ @@ -1419,7 +1437,15 @@ libvirtd_LDADD +=3D \ $(NULL) =20 endif WITH_LIBVIRTD -EXTRA_DIST +=3D remote/test_libvirtd.aug.in remote/libvirtd.aug remote/lib= virtd.conf +EXTRA_DIST +=3D \ + remote/test_libvirtd.aug.in \ + remote/libvirtd.aug \ + remote/libvirtd.conf \ + remote/libvirtd.policy.in \ + remote/libvirtd.rules \ + remote/libvirtd.sasl \ + remote/libvirtd.sysctl \ + $(NULL) =20 %protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ @@ -2826,6 +2852,45 @@ SYSVINIT_FILES =3D $(notdir $(SYSVINIT_FILES_IN:%.in= =3D%)) EXTRA_DIST +=3D $(SYSVINIT_FILES_IN) =20 if WITH_LIBVIRTD + +if WITH_SYSCTL +# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on +# /usr/lib/sysctl.d/ even when libdir is /usr/lib64 +install-sysctl: + $(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d + $(INSTALL_DATA) $(srcdir)/remote/libvirtd.sysctl \ + $(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf + +uninstall-sysctl: + rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf + rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || : +else ! WITH_SYSCTL +install-sysctl: +uninstall-sysctl: +endif ! WITH_SYSCTL + +if WITH_POLKIT +install-polkit:: + $(MKDIR_P) $(DESTDIR)$(policydir) + $(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.p= olicy +if ! WITH_POLKIT0 + $(MKDIR_P) $(DESTDIR)$(datadir)/polkit-1/rules.d + $(INSTALL_DATA) $(srcdir)/remote/libvirtd.rules $(DESTDIR)$(datadir)/polk= it-1/rules.d/50-libvirt.rules +endif ! WITH_POLKIT0 + +uninstall-polkit:: + rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy + rmdir $(DESTDIR)$(policydir) || : +if ! WITH_POLKIT0 + rm -f $(DESTDIR)$(datadir)/polkit-1/rules.d/50-libvirt.rules + rmdir $(DESTDIR)$(datadir)/polkit-1/rules.d || : +endif ! WITH_POLKIT0 + +else ! WITH_POLKIT +install-polkit:: +uninstall-polkit:: +endif ! WITH_POLKIT + if LIBVIRT_INIT_SCRIPT_RED_HAT install-init:: $(SYSVINIT_FILES) install-sysconfig $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d @@ -2845,10 +2910,31 @@ install-init:: uninstall-init:: endif ! LIBVIRT_INIT_SCRIPT_RED_HAT else ! WITH_LIBVIRTD +install-polkit:: +uninstall-polkit:: +install-sysctl:: +uninstall-sysctl:: install-init:: uninstall-init:: endif ! WITH_LIBVIRTD =20 +# This is needed for clients too, so can't wrap in +# the WITH_LIBVIRTD conditional +if WITH_SASL +install-sasl: + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/ + $(INSTALL_DATA) $(srcdir)/remote/libvirtd.sasl \ + $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf + +uninstall-sasl: + rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf + rmdir $(DESTDIR)$(sysconfdir)/sasl2/ || : +else ! WITH_SASL +install-sasl: +uninstall-sasl: +endif ! WITH_SASL + + libvirtd.init: remote/libvirtd.init.in $(top_builddir)/config.status $(AM_V_GEN)sed \ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ @@ -3440,7 +3526,7 @@ libvirt_nss_la_LIBADD =3D \ endif WITH_NSS =20 =20 -install-data-local: install-init install-systemd install-upstart +install-data-local: install-init install-systemd install-upstart install-s= ysctl install-polkit install-sasl if WITH_LIBVIRTD $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" @@ -3495,7 +3581,7 @@ if WITH_NETWORK $(LN_S) ../default.xml default.xml ) endif WITH_NETWORK =20 -uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart +uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart unins= tall-sysctl uninstall-polkit uninstall-sasl if WITH_LIBVIRTD rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" ||: rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" ||: diff --git a/daemon/libvirtd.policy.in b/src/remote/libvirtd.policy.in similarity index 100% rename from daemon/libvirtd.policy.in rename to src/remote/libvirtd.policy.in diff --git a/daemon/libvirt.rules b/src/remote/libvirtd.rules similarity index 100% rename from daemon/libvirt.rules rename to src/remote/libvirtd.rules diff --git a/daemon/libvirtd.sasl b/src/remote/libvirtd.sasl similarity index 100% rename from daemon/libvirtd.sasl rename to src/remote/libvirtd.sasl diff --git a/daemon/libvirtd.sysctl b/src/remote/libvirtd.sysctl similarity index 100% rename from daemon/libvirtd.sysctl rename to src/remote/libvirtd.sysctl --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 03:31:09 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227367052205.29355096518452; Wed, 21 Feb 2018 07:36:07 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8FBB980462; Wed, 21 Feb 2018 15:36:05 +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 6281460471; Wed, 21 Feb 2018 15:36:05 +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 3A9184A481; Wed, 21 Feb 2018 15:36:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZgkB021014 for ; Wed, 21 Feb 2018 10:35:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3411510A9713; Wed, 21 Feb 2018 15:35:42 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1F2210A9711; Wed, 21 Feb 2018 15:35:40 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:25 +0000 Message-Id: <20180221153525.14973-11-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 10/10] daemon: move logrotate files to src/remote/ 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 21 Feb 2018 15:36:06 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Daniel P. Berrang=C3=A9 --- Makefile.am | 2 +- configure.ac | 1 - daemon/Makefile.am | 117 -----------------= ---- src/Makefile.am | 45 +++++++- {daemon =3D> src/remote}/libvirtd.libxl.logrotate.in | 0 {daemon =3D> src/remote}/libvirtd.logrotate.in | 0 {daemon =3D> src/remote}/libvirtd.lxc.logrotate.in | 0 {daemon =3D> src/remote}/libvirtd.qemu.logrotate.in | 0 {daemon =3D> src/remote}/libvirtd.uml.logrotate.in | 0 9 files changed, 44 insertions(+), 121 deletions(-) delete mode 100644 daemon/Makefile.am rename {daemon =3D> src/remote}/libvirtd.libxl.logrotate.in (100%) rename {daemon =3D> src/remote}/libvirtd.logrotate.in (100%) rename {daemon =3D> src/remote}/libvirtd.lxc.logrotate.in (100%) rename {daemon =3D> src/remote}/libvirtd.qemu.logrotate.in (100%) rename {daemon =3D> src/remote}/libvirtd.uml.logrotate.in (100%) diff --git a/Makefile.am b/Makefile.am index 5a805b5ee8..0d46c16c22 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ LCOV =3D lcov GENHTML =3D genhtml =20 -SUBDIRS =3D . gnulib/lib include/libvirt src daemon tools docs gnulib/test= s \ +SUBDIRS =3D . gnulib/lib include/libvirt src tools docs gnulib/tests \ tests po examples =20 XZ_OPT ?=3D -v -T0 diff --git a/configure.ac b/configure.ac index 7997ec5a14..5e720d1b76 100644 --- a/configure.ac +++ b/configure.ac @@ -916,7 +916,6 @@ AC_CONFIG_FILES([\ libvirt.spec mingw-libvirt.spec \ po/Makefile.in \ include/libvirt/libvirt-common.h \ - daemon/Makefile \ examples/Makefile \ tests/Makefile \ tools/Makefile]) diff --git a/daemon/Makefile.am b/daemon/Makefile.am deleted file mode 100644 index ab7faf3e66..0000000000 --- a/daemon/Makefile.am +++ /dev/null @@ -1,117 +0,0 @@ -## Process this file with automake to produce Makefile.in - -## Copyright (C) 2005-2015 Red Hat, Inc. -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library. If not, see -## . - -CLEANFILES =3D - -DISTCLEANFILES =3D -EXTRA_DIST =3D \ - libvirtd.logrotate.in \ - libvirtd.qemu.logrotate.in \ - libvirtd.lxc.logrotate.in \ - libvirtd.libxl.logrotate.in \ - libvirtd.uml.logrotate.in \ - THREADS.txt \ - $(NULL) - -BUILT_SOURCES =3D - -if WITH_LIBVIRTD - - - -install-data-local: install-logrotate - $(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \ - $(DESTDIR)$(localstatedir)/run/libvirt \ - $(DESTDIR)$(localstatedir)/lib/libvirt - -uninstall-local:: uninstall-logrotate - rmdir $(DESTDIR)$(localstatedir)/log/libvirt || : - rmdir $(DESTDIR)$(localstatedir)/run/libvirt || : - rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || : - -LOGROTATE_CONFS =3D libvirtd.qemu.logrotate libvirtd.lxc.logrotate \ - libvirtd.libxl.logrotate libvirtd.uml.logrotate \ - libvirtd.logrotate - -BUILT_SOURCES +=3D $(LOGROTATE_CONFS) - -libvirtd.logrotate: libvirtd.logrotate.in - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd.libxl.logrotate: libvirtd.libxl.logrotate.in - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -libvirtd.uml.logrotate: libvirtd.uml.logrotate.in - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -install-logrotate: $(LOGROTATE_CONFS) - $(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt/qemu/ \ - $(DESTDIR)$(localstatedir)/log/libvirt/lxc/ \ - $(DESTDIR)$(localstatedir)/log/libvirt/uml/ \ - $(DESTDIR)$(sysconfdir)/logrotate.d/ - $(INSTALL_DATA) libvirtd.logrotate \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd - $(INSTALL_DATA) libvirtd.qemu.logrotate \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu - $(INSTALL_DATA) libvirtd.lxc.logrotate \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc - $(INSTALL_DATA) libvirtd.libxl.logrotate \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl - $(INSTALL_DATA) libvirtd.uml.logrotate \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml - -uninstall-logrotate: - rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl \ - $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml - rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || : - rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || : - rmdir $(DESTDIR)$(localstatedir)/log/libvirt/uml || : - rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || : - -else ! WITH_LIBVIRTD -install-data-local: -uninstall-local:: -endif ! WITH_LIBVIRTD - - -CLEANFILES +=3D $(BUILT_SOURCES) -CLEANFILES +=3D *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda diff --git a/src/Makefile.am b/src/Makefile.am index e1a883fa84..46329fae74 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2851,8 +2851,41 @@ SYSVINIT_FILES =3D $(notdir $(SYSVINIT_FILES_IN:%.in= =3D%)) =20 EXTRA_DIST +=3D $(SYSVINIT_FILES_IN) =20 +LOGROTATE_FILES_IN =3D \ + remote/libvirtd.qemu.logrotate.in \ + remote/libvirtd.lxc.logrotate.in \ + remote/libvirtd.libxl.logrotate.in \ + remote/libvirtd.uml.logrotate.in \ + remote/libvirtd.logrotate.in \ + $(NULL) + +EXTRA_DIST +=3D $(LOGROTATE_FILES_IN) + if WITH_LIBVIRTD =20 +LOGROTATE_FILES :=3D $(LOGROTATE_FILES_IN:remote/%.in=3D%) + +BUILT_SOURCES +=3D $(LOGROTATE_FILES) + +%.logrotate: remote/%.logrotate.in + $(AM_V_GEN)sed \ + -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ + < $< > $@-t && \ + mv $@-t $@ + +install-logrotate: $(LOGROTATE_FILES) + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/logrotate.d/ + for f in $(LOGROTATE_FILES) ; \ + do \ + tgt=3D`echo $$f | sed -e 's/.logrotate//'`; \ + $(INSTALL_DATA) $$f \ + $(DESTDIR)$(sysconfdir)/logrotate.d/$$tgt; \ + done + +uninstall-logrotate: + rm -f $(LOGROTATE_FILES:%.logrotate=3D$(DESTDIR)$(sysconfdir)/logrotate.d= /%) + rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || : + if WITH_SYSCTL # Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on # /usr/lib/sysctl.d/ even when libdir is /usr/lib64 @@ -2916,6 +2949,8 @@ install-sysctl:: uninstall-sysctl:: install-init:: uninstall-init:: +install-logrotate:: +uninstall-logrotate:: endif ! WITH_LIBVIRTD =20 # This is needed for clients too, so can't wrap in @@ -3526,8 +3561,9 @@ libvirt_nss_la_LIBADD =3D \ endif WITH_NSS =20 =20 -install-data-local: install-init install-systemd install-upstart install-s= ysctl install-polkit install-sasl +install-data-local: install-init install-systemd install-upstart install-s= ysctl install-polkit install-sasl install-logrotate if WITH_LIBVIRTD + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lockd" @@ -3548,6 +3584,7 @@ endif WITH_QEMU if WITH_LXC $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/lxc" endif WITH_LXC if WITH_LIBXL $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl" @@ -3557,6 +3594,7 @@ endif WITH_LIBXL if WITH_UML $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/uml" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/uml" + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/uml" endif WITH_UML if WITH_XEN $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" @@ -3581,8 +3619,9 @@ if WITH_NETWORK $(LN_S) ../default.xml default.xml ) endif WITH_NETWORK =20 -uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart unins= tall-sysctl uninstall-polkit uninstall-sasl +uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart unins= tall-sysctl uninstall-polkit uninstall-sasl uninstall-logrotate if WITH_LIBVIRTD + rmdir "$(DESTDIR)$(localstatedir)/log/libvirt" ||: rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" ||: rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" ||: rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lockd" ||: @@ -3603,6 +3642,7 @@ endif WITH_QEMU if WITH_LXC rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" ||: rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" ||: + rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/lxc" ||: endif WITH_LXC if WITH_LIBXL rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl" ||: @@ -3612,6 +3652,7 @@ endif WITH_LIBXL if WITH_UML rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/uml" ||: rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/uml" ||: + rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/uml" ||: endif WITH_UML if WITH_XEN rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||: diff --git a/daemon/libvirtd.libxl.logrotate.in b/src/remote/libvirtd.libxl= .logrotate.in similarity index 100% rename from daemon/libvirtd.libxl.logrotate.in rename to src/remote/libvirtd.libxl.logrotate.in diff --git a/daemon/libvirtd.logrotate.in b/src/remote/libvirtd.logrotate.in similarity index 100% rename from daemon/libvirtd.logrotate.in rename to src/remote/libvirtd.logrotate.in diff --git a/daemon/libvirtd.lxc.logrotate.in b/src/remote/libvirtd.lxc.log= rotate.in similarity index 100% rename from daemon/libvirtd.lxc.logrotate.in rename to src/remote/libvirtd.lxc.logrotate.in diff --git a/daemon/libvirtd.qemu.logrotate.in b/src/remote/libvirtd.qemu.l= ogrotate.in similarity index 100% rename from daemon/libvirtd.qemu.logrotate.in rename to src/remote/libvirtd.qemu.logrotate.in diff --git a/daemon/libvirtd.uml.logrotate.in b/src/remote/libvirtd.uml.log= rotate.in similarity index 100% rename from daemon/libvirtd.uml.logrotate.in rename to src/remote/libvirtd.uml.logrotate.in --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list