[PATCH] specfile: fix make rpm when with_driver_modules is 1

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

 



Commit ff76566 moved around things in the specfiles to put
driver-specific files into their appropriate sub-packages (when
with_driver_modules == 1), but accidentally changed things so that the
deamon-driver-network and daemon-config-network files were only
included in a package when with_driver_modules == 0. This broke "make
rpm" on fedora (where with_driver_modules == 1).

This patch follows the pattern (already used for the files in other
sub-modules) of duplicating the files for the main package
(!with_driver_modules) and the sub-package (with_driver_modules). I
think this is asking for trouble, but the first priority is to fix the
build, then worry about removing redundancy later.
---

I would push this as a build breaker, but am unsure enough of my
specfile knowledge to be certain that I'm not breaking something else
(it does allow make rpm to complete successfully). Since I have to
leave for the weekend *right now*, I would appreciate if someone else
can push this for me if it's a proper fix.

Thanks!

 libvirt.spec.in | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index f615c62..d7d0e7e 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1843,14 +1843,16 @@ exit 0
 
     %if ! %{with_driver_modules}
         %if %{with_network}
+# Files from the daemon-driver-network sub-package
 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
 %dir %{_datadir}/libvirt/networks/
-%{_datadir}/libvirt/networks/default.xml
 %ghost %dir %{_localstatedir}/run/libvirt/network/
 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
+# File from the daemon-config-network sub-package
+%{_datadir}/libvirt/networks/default.xml
         %endif
         %if %{with_storage_disk}
 %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
@@ -1894,11 +1896,6 @@ exit 0
         %endif
     %endif # ! %{with_driver_modules}
 
-    %if %{with_network}
-%files daemon-config-network
-%defattr(-, root, root)
-    %endif
-
     %if %{with_nwfilter}
 %files daemon-config-nwfilter
 %defattr(-, root, root)
@@ -1913,8 +1910,19 @@ exit 0
         %endif
 
         %if %{with_network}
+%files daemon-config-network
+%defattr(-, root, root)
+%{_datadir}/libvirt/networks/default.xml
+
 %files daemon-driver-network
 %defattr(-, root, root)
+%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
+%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
+%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
+%dir %{_datadir}/libvirt/networks/
+%ghost %dir %{_localstatedir}/run/libvirt/network/
+%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
+%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
 %{_libdir}/%{name}/connection-driver/libvirt_driver_network.so
         %endif
 
-- 
1.8.3.1

--
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]