Move the systemd, sysvinit, upstart and sysconfig files into the
src/remote/ directory.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitignore | 1 +
daemon/Makefile.am | 94 +---------------------
src/Makefile.am | 61 +++++++++++++-
{daemon => src/remote}/libvirtd.init.in | 0
{daemon => src/remote}/libvirtd.service.in | 0
{daemon => src/remote}/libvirtd.sysconf | 0
{daemon => src/remote}/libvirtd.upstart | 0
.../remote/virt-guest-shutdown.target.in | 0
8 files changed, 62 insertions(+), 94 deletions(-)
rename {daemon => src/remote}/libvirtd.init.in (100%)
rename {daemon => src/remote}/libvirtd.service.in (100%)
rename {daemon => src/remote}/libvirtd.sysconf (100%)
rename {daemon => src/remote}/libvirtd.upstart (100%)
rename daemon/virt-guest-shutdown.target => src/remote/virt-guest-shutdown.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 =
DISTCLEANFILES =
EXTRA_DIST = \
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)/config.status
mv $@-t $@
BUILT_SOURCES += libvirtd.policy
-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
-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 || :
-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
-if LIBVIRT_INIT_SCRIPT_RED_HAT
-
-BUILT_SOURCES += 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 = $(prefix)/lib/systemd/system
-BUILT_SOURCES += 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
AUG_GENTEST = $(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 = \
locking/virtlockd.sysconf \
logging/virtlogd.sysconf \
+ remote/libvirtd.sysconf \
$(NULL)
EXTRA_DIST += \
@@ -2795,6 +2796,7 @@ uninstall-sysconfig:
SYSVINIT_FILES_IN = \
locking/virtlockd.init.in \
logging/virtlogd.init.in \
+ remote/libvirtd.init.in \
$(NULL)
SYSVINIT_FILES = $(notdir $(SYSVINIT_FILES_IN:%.in=%))
@@ -2825,6 +2827,15 @@ install-init::
uninstall-init::
endif ! WITH_LIBVIRTD
+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 = \
logging/virtlogd.service.in \
logging/virtlogd.socket.in \
logging/virtlogd-admin.socket.in \
+ remote/libvirtd.service.in \
+ remote/virt-guest-shutdown.target.in \
$(NULL)
EXTRA_DIST += \
@@ -2954,6 +2967,17 @@ install-systemd:
uninstall-systemd:
endif ! WITH_LIBVIRTD
+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_builddir)/config.status
+ $(AM_V_GEN)cp $< $@
+
virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
$(AM_V_GEN)sed \
-e 's|[@]sbindir[@]|$(sbindir)|g' \
@@ -2993,6 +3017,39 @@ virtlogd-admin.socket: logging/virtlogd-admin.socket.in \
mv $@-t $@
+UPSTART_FILES = \
+ remote/libvirtd.upstart \
+ $(NULL)
+
+EXTRA_DIST += $(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=%); \
+ do \
+ tgt=`basename $$f` ; \
+ $(INSTALL_SCRIPT) $$f.upstart $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
+ done
+
+uninstall-upstart: uninstall-sysconfig
+ for f in $(UPSTART_FILES:%.upstart=%); \
+ do \
+ tgt=`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 += sanlock.la
sanlock_la_SOURCES = $(LOCK_DRIVER_SANLOCK_SOURCES)
@@ -3361,7 +3418,7 @@ libvirt_nss_la_LIBADD = \
endif WITH_NSS
-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
-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-shutdown.target.in
similarity index 100%
rename from daemon/virt-guest-shutdown.target
rename to src/remote/virt-guest-shutdown.target.in
--
2.14.3