diff --git a/libvirt-0.9.8-systemd-libvirt-guests.patch b/libvirt-0.9.8-systemd-libvirt-guests.patch new file mode 100644 index 0000000..7933774 --- /dev/null +++ b/libvirt-0.9.8-systemd-libvirt-guests.patch @@ -0,0 +1,81 @@ +commit 455c85302f4ed14c7cd953d10cdfbb0efeccd7ed +Author: Daniel P. Berrange +Date: Thu Dec 8 13:30:24 2011 +0000 + + Fix installation of libvirt-guests.service + + The installation rules for the libvirt-guests.service were + totally broken + + - Installing in the wrong location + - The location was not overridable + - The install-systemd rule was not invoked anywhere + - The install-systemd rule was not invoking install-initscript + which it depends on + - The installed service file lacked a .service extension + + * tools/Makefile.am: Fix install of libvirt-guests.service + +diff --git a/tools/Makefile.am b/tools/Makefile.am +index c735398..25f0ffe 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -148,9 +148,9 @@ endif + virsh.1: virsh.pod + $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ + +-install-data-local: install-init ++install-data-local: install-init install-systemd + +-uninstall-local: uninstall-init ++uninstall-local: uninstall-init uninstall-systemd + + install-sysconfig: + mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig +@@ -162,17 +162,20 @@ uninstall-sysconfig: + + EXTRA_DIST += libvirt-guests.init.sh + +-if LIBVIRT_INIT_SCRIPT_RED_HAT +-install-init: libvirt-guests.init install-sysconfig ++install-initscript: libvirt-guests.init + mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d + $(INSTALL_SCRIPT) libvirt-guests.init \ + $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests + +-uninstall-init: install-sysconfig ++uninstall-initscript: + rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests + +-BUILT_SOURCES += libvirt-guests.init + ++ ++if LIBVIRT_INIT_SCRIPT_RED_HAT ++BUILT_SOURCES += libvirt-guests.init ++install-init: install-sysconfig install-initscript ++uninstall-init: uninstall-sysconfig uninstall-initscript + else + install-init: + uninstall-init: +@@ -194,14 +197,16 @@ libvirt-guests.init: libvirt-guests.init.sh $(top_builddir)/config.status + + EXTRA_DIST += libvirt-guests.service.in + ++SYSTEMD_UNIT_DIR = /lib/systemd/system ++ + if LIBVIRT_INIT_SCRIPT_SYSTEMD +-install-systemd: libvirt-guests.service install-sysconfig +- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/systemd.d ++install-systemd: libvirt-guests.service install-initscript install-sysconfig ++ mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR) + $(INSTALL_SCRIPT) libvirt-guests.service \ +- $(DESTDIR)$(sysconfdir)/rc.d/systemd.d/libvirt-guests ++ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service + +-uninstall-systemd: install-sysconfig +- rm -f $(DESTDIR)$(sysconfdir)/rc.d/systemd.d/libvirt-guests ++uninstall-systemd: uninstall-initscript uninstall-sysconfig ++ rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service + + BUILT_SOURCES += libvirt-guests.service + diff --git a/libvirt.spec b/libvirt.spec index 4e9f507..7883f08 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -8,6 +8,11 @@ sed -ne 's/^\.fc\?\([0-9]\+\).*/%%define fedora \1/p')} %endif +# Default to skipping autoreconf. Distros can change just this one line +# (or provide a command-line override) if they backport any patches that +# touch configure.ac or Makefile.am. +%define enable_autotools %{?enable_autotools:1} + # A client only build will create a libvirt.so only containing # the generic RPC driver, and test driver and no libvirtd # Default to a full server + client build @@ -247,10 +252,11 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 0.9.8 -Release: 1%{?dist}%{?extra_release} +Release: 2%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz +Patch1: %{name}-%{version}-systemd-libvirt-guests.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/ @@ -349,6 +355,11 @@ Requires(postun): systemd-units %endif # All build-time requirements +%if 0%{?enable_autotools} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +%endif BuildRequires: python-devel %if %{with_systemd} BuildRequires: systemd-units @@ -573,6 +584,7 @@ of recent versions of Linux (and other OSes). %prep %setup -q +%patch1 -p1 %build %if ! %{with_xen} @@ -733,6 +745,9 @@ of recent versions of Linux (and other OSes). %define init_scripts --with-init_script=redhat %endif +%if 0%{?enable_autotools} +autoreconf -if +%endif %configure %{?_without_xen} \ %{?_without_qemu} \ %{?_without_openvz} \ @@ -780,7 +795,7 @@ gzip -9 ChangeLog %install rm -fr %{buildroot} -%makeinstall SYSTEMD_UNIT_DIR=%{_unitdir} +%makeinstall SYSTEMD_UNIT_DIR=%{buildroot}%{_unitdir} for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap do (cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in) @@ -1257,6 +1272,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd %endif %changelog +* Thu Dec 8 2011 Daniel P. Berrange - 0.9.8-2 +- Fix install of libvirt-guests.service & libvirtd.service + * Thu Dec 8 2011 Daniel Veillard - 0.9.8-1 - Add support for QEMU 1.0 - Add preliminary PPC cpu driver