mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
libxl: add logrotate config file
Add logrotate config for log files in /var/log/libvirt/libxl.
This commit is contained in:
parent
d12790ebe8
commit
77664cb406
@ -63,6 +63,7 @@ EXTRA_DIST = \
|
|||||||
libvirtd.logrotate.in \
|
libvirtd.logrotate.in \
|
||||||
libvirtd.qemu.logrotate.in \
|
libvirtd.qemu.logrotate.in \
|
||||||
libvirtd.lxc.logrotate.in \
|
libvirtd.lxc.logrotate.in \
|
||||||
|
libvirtd.libxl.logrotate.in \
|
||||||
libvirtd.uml.logrotate.in \
|
libvirtd.uml.logrotate.in \
|
||||||
test_libvirtd.aug.in \
|
test_libvirtd.aug.in \
|
||||||
THREADS.txt \
|
THREADS.txt \
|
||||||
@ -288,7 +289,8 @@ remote.c: $(DAEMON_GENERATED)
|
|||||||
remote.h: $(DAEMON_GENERATED)
|
remote.h: $(DAEMON_GENERATED)
|
||||||
|
|
||||||
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
|
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
|
||||||
libvirtd.uml.logrotate libvirtd.logrotate
|
libvirtd.libxl.logrotate libvirtd.uml.logrotate \
|
||||||
|
libvirtd.logrotate
|
||||||
|
|
||||||
BUILT_SOURCES += $(LOGROTATE_CONFS)
|
BUILT_SOURCES += $(LOGROTATE_CONFS)
|
||||||
|
|
||||||
@ -310,6 +312,12 @@ libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
|||||||
< $< > $@-t && \
|
< $< > $@-t && \
|
||||||
mv $@-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
|
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
|
||||||
$(AM_V_GEN)sed \
|
$(AM_V_GEN)sed \
|
||||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||||
@ -327,6 +335,8 @@ install-logrotate: $(LOGROTATE_CONFS)
|
|||||||
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
|
||||||
$(INSTALL_DATA) libvirtd.lxc.logrotate \
|
$(INSTALL_DATA) libvirtd.lxc.logrotate \
|
||||||
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
|
||||||
|
$(INSTALL_DATA) libvirtd.libxl.logrotate \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl
|
||||||
$(INSTALL_DATA) libvirtd.uml.logrotate \
|
$(INSTALL_DATA) libvirtd.uml.logrotate \
|
||||||
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
||||||
|
|
||||||
@ -334,6 +344,7 @@ uninstall-logrotate:
|
|||||||
rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
|
rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
|
||||||
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \
|
||||||
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl \
|
||||||
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
||||||
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
|
||||||
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || :
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || :
|
||||||
|
9
daemon/libvirtd.libxl.logrotate.in
Normal file
9
daemon/libvirtd.libxl.logrotate.in
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@localstatedir@/log/libvirt/libxl/*.log {
|
||||||
|
weekly
|
||||||
|
missingok
|
||||||
|
rotate 4
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
copytruncate
|
||||||
|
minsize 100k
|
||||||
|
}
|
@ -1601,6 +1601,7 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
|
|||||||
%endif
|
%endif
|
||||||
%if ! %{with_libxl}
|
%if ! %{with_libxl}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl
|
||||||
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
|
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
|
||||||
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
|
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
|
||||||
%endif
|
%endif
|
||||||
@ -2018,6 +2019,7 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
%if %{with_libxl}
|
%if %{with_libxl}
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
|
||||||
%ghost %dir %{_localstatedir}/run/libvirt/libxl/
|
%ghost %dir %{_localstatedir}/run/libvirt/libxl/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
|
||||||
@ -2140,6 +2142,7 @@ exit 0
|
|||||||
%files daemon-driver-libxl
|
%files daemon-driver-libxl
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf
|
||||||
%{_datadir}/augeas/lenses/libvirtd_libxl.aug
|
%{_datadir}/augeas/lenses/libvirtd_libxl.aug
|
||||||
|
Loading…
x
Reference in New Issue
Block a user