mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +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.qemu.logrotate.in \
|
||||
libvirtd.lxc.logrotate.in \
|
||||
libvirtd.libxl.logrotate.in \
|
||||
libvirtd.uml.logrotate.in \
|
||||
test_libvirtd.aug.in \
|
||||
THREADS.txt \
|
||||
@ -288,7 +289,8 @@ remote.c: $(DAEMON_GENERATED)
|
||||
remote.h: $(DAEMON_GENERATED)
|
||||
|
||||
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)
|
||||
|
||||
@ -310,6 +312,12 @@ libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
||||
< $< > $@-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' \
|
||||
@ -327,6 +335,8 @@ install-logrotate: $(LOGROTATE_CONFS)
|
||||
$(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
|
||||
|
||||
@ -334,6 +344,7 @@ 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 || :
|
||||
|
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
|
||||
%if ! %{with_libxl}
|
||||
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/tests/test_libvirtd_libxl.aug
|
||||
%endif
|
||||
@ -2018,6 +2019,7 @@ exit 0
|
||||
%endif
|
||||
%if %{with_libxl}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
|
||||
%ghost %dir %{_localstatedir}/run/libvirt/libxl/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
|
||||
@ -2140,6 +2142,7 @@ exit 0
|
||||
%files daemon-driver-libxl
|
||||
%defattr(-, root, root)
|
||||
%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-sanlock.conf
|
||||
%{_datadir}/augeas/lenses/libvirtd_libxl.aug
|
||||
|
Loading…
x
Reference in New Issue
Block a user