* Tue Oct 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-10
- Create /var/log/libvirt/{lxc,uml} dirs for logrotate - Make libvirt-python dependon on libvirt-client - Sync misc minor changes from upstream spec
This commit is contained in:
parent
4ab5ad5425
commit
86abd54d02
54
libvirt-logrotate-create-lxc-uml-dirs.patch
Normal file
54
libvirt-logrotate-create-lxc-uml-dirs.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From b7e3ac4f23befe67518b57e34691c301820a436c Mon Sep 17 00:00:00 2001
|
||||
From: Mark McLoughlin <markmc@redhat.com>
|
||||
Date: Tue, 6 Oct 2009 12:33:17 +0100
|
||||
Subject: [PATCH] Create /var/log/libvirt/{lxc,uml} dirs
|
||||
|
||||
Otherwise logrotate barfs:
|
||||
|
||||
error: error accessing /var/log/libvirt/uml: No such file or directory
|
||||
error: libvirtd:1 glob failed for /var/log/libvirt/uml/*.log
|
||||
error: found error in /var/log/libvirt/qemu/*.log /var/log/libvirt/uml/*.log /var/log/libvirt/lxc/*.log , skipping
|
||||
|
||||
* qemud/Makefile.am: always create /var/log/libvirt/{lxc,uml} when
|
||||
installing the logrotate conf; not ideal, but easier than making
|
||||
the logrotate conf depend on which drivers are enabled
|
||||
|
||||
Fedora-patch: libvirt-logrotate-create-lxc-uml-dirs.patch
|
||||
---
|
||||
qemud/Makefile.am | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/qemud/Makefile.am b/qemud/Makefile.am
|
||||
index 3d143da..a7f4bdf 100644
|
||||
--- a/qemud/Makefile.am
|
||||
+++ b/qemud/Makefile.am
|
||||
@@ -176,7 +176,7 @@ install-data-local: install-init install-data-sasl install-data-polkit \
|
||||
test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
|
||||
ln -s ../default.xml \
|
||||
$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
|
||||
- mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu
|
||||
+ mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt
|
||||
|
||||
@@ -184,7 +184,7 @@ uninstall-local:: uninstall-init uninstall-data-sasl install-data-polkit
|
||||
rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
|
||||
rm -f $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
|
||||
rmdir $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart || :
|
||||
- rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
|
||||
+ rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
|
||||
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
||||
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
|
||||
|
||||
@@ -240,6 +240,8 @@ libvirtd.logrotate: libvirtd.logrotate.in
|
||||
|
||||
install-logrotate: libvirtd.logrotate
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu/
|
||||
+ mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/lxc/
|
||||
+ mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/uml/
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d/
|
||||
$(INSTALL_DATA) $< $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
|
||||
|
||||
--
|
||||
1.6.2.5
|
||||
|
42
libvirt.spec
42
libvirt.spec
@ -22,14 +22,14 @@
|
||||
%endif
|
||||
|
||||
|
||||
# Now set the defaults for all the important features, independant
|
||||
# Now set the defaults for all the important features, independent
|
||||
# of any particular OS
|
||||
|
||||
# First the daemon itself
|
||||
%define with_libvirtd 0%{!?_without_libvirtd:%{server_drivers}}
|
||||
%define with_avahi 0%{!?_without_avahi:%{server_drivers}}
|
||||
|
||||
# Then the hypervisor drivers
|
||||
# Then the hypervisor drivers that run on local host
|
||||
%define with_xen 0%{!?_without_xen:%{server_drivers}}
|
||||
%define with_xen_proxy 0%{!?_without_xen_proxy:%{server_drivers}}
|
||||
%define with_qemu 0%{!?_without_qemu:%{server_drivers}}
|
||||
@ -37,9 +37,12 @@
|
||||
%define with_lxc 0%{!?_without_lxc:%{server_drivers}}
|
||||
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
|
||||
%define with_uml 0%{!?_without_uml:%{server_drivers}}
|
||||
# XXX this shouldn't be here, but it mistakenly links into libvirtd
|
||||
%define with_one 0%{!?_without_one:%{server_drivers}}
|
||||
%define with_phyp 0%{!?_without_phyp:%{server_drivers}}
|
||||
%define with_esx 0%{!?_without_esx:%{server_drivers}}
|
||||
|
||||
# Then the hypervisor drivers that talk a native remote protocol
|
||||
%define with_phyp 0%{!?_without_phyp:1}
|
||||
%define with_esx 0%{!?_without_esx:1}
|
||||
|
||||
# Then the secondary host drivers
|
||||
%define with_network 0%{!?_without_network:%{server_drivers}}
|
||||
@ -69,10 +72,6 @@
|
||||
%define with_xen 0
|
||||
%endif
|
||||
|
||||
# Numactl is not available on s390[x]
|
||||
%ifarch s390 s390x
|
||||
%define with_numactl 0
|
||||
%endif
|
||||
|
||||
# RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor or ESX
|
||||
%if 0%{?rhel}
|
||||
@ -100,6 +99,7 @@
|
||||
%endif
|
||||
%define with_xen 0
|
||||
%endif
|
||||
|
||||
# If Xen isn't turned on, we shouldn't build the xen proxy either
|
||||
%if ! %{with_xen}
|
||||
%define with_xen_proxy 0
|
||||
@ -151,7 +151,7 @@
|
||||
Summary: Library providing a simple API virtualization
|
||||
Name: libvirt
|
||||
Version: 0.7.1
|
||||
Release: 9%{?dist}%{?extra_release}
|
||||
Release: 10%{?dist}%{?extra_release}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
|
||||
@ -177,6 +177,7 @@ Patch07: libvirt-svirt-relabel-qcow2-backing-files.patch
|
||||
|
||||
# Change logrotate config to weekly (#526769)
|
||||
Patch08: libvirt-change-logrotate-config-to-weekly.patch
|
||||
Patch09: libvirt-logrotate-create-lxc-uml-dirs.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
URL: http://libvirt.org/
|
||||
@ -337,6 +338,9 @@ BuildRequires: netcf-devel
|
||||
# Fedora build root suckage
|
||||
BuildRequires: gawk
|
||||
|
||||
# Needed for libvirt-logrotate-create-lxc-uml-dirs.patch
|
||||
BuildRequires: automake
|
||||
|
||||
%description
|
||||
Libvirt is a C toolkit to interact with the virtualization capabilities
|
||||
of recent versions of Linux (and other OSes). The main package includes
|
||||
@ -378,7 +382,7 @@ the virtualization capabilities of recent versions of Linux (and other OSes).
|
||||
%package python
|
||||
Summary: Python bindings for the libvirt library
|
||||
Group: Development/Libraries
|
||||
Requires: libvirt = %{version}-%{release}
|
||||
Requires: libvirt-client = %{version}-%{release}
|
||||
|
||||
%description python
|
||||
The libvirt-python package contains a module that permits applications
|
||||
@ -398,8 +402,12 @@ of recent versions of Linux (and other OSes).
|
||||
%patch06 -p1
|
||||
%patch07 -p1
|
||||
%patch08 -p1
|
||||
%patch09 -p1
|
||||
|
||||
%build
|
||||
# Needed for libvirt-logrotate-create-lxc-uml-dirs.patch
|
||||
automake
|
||||
|
||||
%if ! %{with_xen}
|
||||
%define _without_xen --without-xen
|
||||
%endif
|
||||
@ -622,7 +630,7 @@ fi
|
||||
|
||||
/sbin/chkconfig --add libvirtd
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service libvirtd condrestart > /dev/null 2>&1
|
||||
/sbin/service libvirtd condrestart > /dev/null 2>&1
|
||||
fi
|
||||
%endif
|
||||
|
||||
@ -655,6 +663,9 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
||||
|
||||
%if %{with_qemu}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
|
||||
@ -712,13 +723,11 @@ fi
|
||||
%endif
|
||||
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
||||
%if %{with_qemu}
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||
%endif
|
||||
|
||||
%if %{with_xen_proxy}
|
||||
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
|
||||
%endif
|
||||
|
||||
%if %{with_lxc}
|
||||
%attr(0755, root, root) %{_libexecdir}/libvirt_lxc
|
||||
%endif
|
||||
@ -788,6 +797,11 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Oct 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-10
|
||||
- Create /var/log/libvirt/{lxc,uml} dirs for logrotate
|
||||
- Make libvirt-python dependon on libvirt-client
|
||||
- Sync misc minor changes from upstream spec
|
||||
|
||||
* Tue Oct 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.7.1-9
|
||||
- Change logrotate config to weekly (#526769)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user