[libvirt] [PATCH] fix spec file when building without qemu

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

 



  While trying to build libvirt 0.4.6 for Fedora, I got an error
when building on ppc64 which is the only architecture where qemu
support is disabled. Files which were conditional to qemu were
installed nonetheless in the build root:

Checking for unpackaged file(s): /usr/lib/rpm/check-files
/builddir/build/BUILDROOT/libvirt-0.4.6-1.fc10.ppc64
error: Installed (but unpackaged) file(s) found:
   /etc/libvirt/qemu/networks/autostart/default.xml
   /etc/libvirt/qemu/networks/default.xml
   /usr/share/augeas/lenses/libvirtd_qemu.aug
   /usr/share/augeas/lenses/tests/test_libvirtd_qemu.aug

The following patch doesn't look ideal but allows to fix the problem.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
Index: libvirt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt/devel/libvirt.spec,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -p -r1.97 -r1.98
--- libvirt.spec	23 Sep 2008 21:25:17 -0000	1.97
+++ libvirt.spec	24 Sep 2008 07:10:11 -0000	1.98
@@ -238,6 +238,11 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libv
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
 # Strip auto-generated UUID - we need it generated per-install
 sed -i -e "/<uuid>/d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
+%else
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
+rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
+rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
 %endif
 %find_lang %{name}
 
@@ -256,6 +261,7 @@ rm -fr %{buildroot}
 /sbin/ldconfig
 
 %if %{with_libvirtd}
+%if %{with_qemu}
 # We want to install the default network for initial RPM installs
 # or on the first upgrade from a non-network aware libvirt only.
 # We check this by looking to see if the daemon is already installed
@@ -268,6 +274,7 @@ then
          > %{_sysconfdir}/libvirt/qemu/networks/default.xml
     ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
 fi
+%endif
 
 /sbin/chkconfig --add libvirtd
 %endif
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]