Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- Makefile.am | 2 +- configure.ac | 1 - daemon/Makefile.am | 117 --------------------- src/Makefile.am | 45 +++++++- {daemon => src/remote}/libvirtd.libxl.logrotate.in | 0 {daemon => src/remote}/libvirtd.logrotate.in | 0 {daemon => src/remote}/libvirtd.lxc.logrotate.in | 0 {daemon => src/remote}/libvirtd.qemu.logrotate.in | 0 {daemon => src/remote}/libvirtd.uml.logrotate.in | 0 9 files changed, 44 insertions(+), 121 deletions(-) delete mode 100644 daemon/Makefile.am rename {daemon => src/remote}/libvirtd.libxl.logrotate.in (100%) rename {daemon => src/remote}/libvirtd.logrotate.in (100%) rename {daemon => src/remote}/libvirtd.lxc.logrotate.in (100%) rename {daemon => src/remote}/libvirtd.qemu.logrotate.in (100%) rename {daemon => 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 = lcov GENHTML = genhtml -SUBDIRS = . gnulib/lib include/libvirt src daemon tools docs gnulib/tests \ +SUBDIRS = . gnulib/lib include/libvirt src tools docs gnulib/tests \ tests po examples XZ_OPT ?= -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 -## <http://www.gnu.org/licenses/>. - -CLEANFILES = - -DISTCLEANFILES = -EXTRA_DIST = \ - libvirtd.logrotate.in \ - libvirtd.qemu.logrotate.in \ - libvirtd.lxc.logrotate.in \ - libvirtd.libxl.logrotate.in \ - libvirtd.uml.logrotate.in \ - THREADS.txt \ - $(NULL) - -BUILT_SOURCES = - -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 = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \ - libvirtd.libxl.logrotate libvirtd.uml.logrotate \ - libvirtd.logrotate - -BUILT_SOURCES += $(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 += $(BUILT_SOURCES) -CLEANFILES += *.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 = $(notdir $(SYSVINIT_FILES_IN:%.in=%)) EXTRA_DIST += $(SYSVINIT_FILES_IN) +LOGROTATE_FILES_IN = \ + 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 += $(LOGROTATE_FILES_IN) + if WITH_LIBVIRTD +LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%) + +BUILT_SOURCES += $(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=`echo $$f | sed -e 's/.logrotate//'`; \ + $(INSTALL_DATA) $$f \ + $(DESTDIR)$(sysconfdir)/logrotate.d/$$tgt; \ + done + +uninstall-logrotate: + rm -f $(LOGROTATE_FILES:%.logrotate=$(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 # This is needed for clients too, so can't wrap in @@ -3526,8 +3561,9 @@ libvirt_nss_la_LIBADD = \ endif WITH_NSS -install-data-local: install-init install-systemd install-upstart install-sysctl install-polkit install-sasl +install-data-local: install-init install-systemd install-upstart install-sysctl 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 -uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart uninstall-sysctl uninstall-polkit uninstall-sasl +uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart uninstall-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.logrotate.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.logrotate.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.logrotate.in similarity index 100% rename from daemon/libvirtd.uml.logrotate.in rename to src/remote/libvirtd.uml.logrotate.in -- 2.14.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list