[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Change logrotate to be per-hypervisor logs

On Thu, Mar 04, 2010 at 03:36:26PM +0100, Daniel Veillard wrote:
> Original bug is:
>   https://bugzilla.redhat.com/show_bug.cgi?id=547514
> maybe this could be done in slightly different way, possibly more
> generic, but I think doing a simple split is good enough for now.
> Change logrotate to be per-hypervisor logs
> Having a single logrotate configuration file for all hypervisors
> did not work as logrotate would get confused if an hypervisor not
> supported on that platform was still listed. Simplest is to split
> the logrotate as separate per hypervisor files and change the
> spec file to only install the ones compiled in.
> * daemon/libvirtd.lxc.logrotate.in daemon/libvirtd.qemu.logrotate.in
>   daemon/libvirtd.uml.logrotate.in: copy and split the original
>   daemon/libvirtd.logrotate.in file
> * daemon/Makefile.am: update to support the different files
> * libvirt.spec.in: only install the relevant logrotate configs

  Actually that last change was not sufficient, for rpms where qemu
lxc or uml are not compiled in we also must remove the associated
logrotate conf files from the installed tree to avoid rpm build failures

 Since it's an rpm build breaker I pushed that trivial fix,


Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
diff --git a/libvirt.spec.in b/libvirt.spec.in
index a54d546..05ded0a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -592,10 +592,16 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}
 %if ! %{with_qemu}
 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
 %if ! %{with_lxc}
 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
+%if ! %{with_uml}
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
 %if %{with_libvirtd}
 chmod 0644 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirtd

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]