This commit moves a few directories into more appropriate subpackages. In a few cases a directory is owned by two subpackages, however this is OK as long as the permissions and ownership for the directory are consistent between them. - %{_sysconfdir}/libvirt/qemu/ Used by the qemu and network drivers. When building with separate driver modules, this directory is only owned by l-d-d-network. l-d-d-qemu has a hard dependency on l-d-d-network, which means this directory is created with the correct permissions and ownership, however it's clearer if both subpackages own the directory independently. - %{_sysconfdir}/libvirt/nwfilter/ Used by the nwfilter driver only. This directory is currently always owned by libvirt-daemon. This commit moves it into l-d-d-nwfilter when building with separate driver modules. - %{_localstatedir}/run/libvirt/network/ Used by the network and nwfilter drivers. When building without separate driver modules, this directory is should be owned by libvirt-daemon only if either of these drivers are enabled. When building with separate driver modules, this directory should be owned by l-d-d-nwfilter in addition to l-d-d-network. - %{_datadir}/libvirt/networks/ and %{_datadir}/libvirt/networks/default.xml Used only by the %post scriptlet in libvirt-daemon-config-network. Signed-off-by: Michael Chapman <mike@xxxxxxxxxxxxxxxxx> --- libvirt.spec.in | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 014fe5d..ac71db0 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1837,10 +1837,6 @@ exit 0 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ - %if %{with_nwfilter} -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ - %endif - %if %{with_systemd} %{_unitdir}/libvirtd.service %{_unitdir}/virtlockd.service @@ -1903,16 +1899,21 @@ exit 0 %{_mandir}/man8/virtlockd.8* %if ! %{with_driver_modules} - %if %{with_network} + %if %{with_network} || %{with_qemu} %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ + %endif + %if %{with_network} || %{with_nwfilter} +%ghost %dir %{_localstatedir}/run/libvirt/network/ + %endif + %if %{with_network} %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/ %endif + %if %{with_nwfilter} +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ + %endif %if %{with_storage_disk} %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper %endif @@ -1958,6 +1959,8 @@ exit 0 %if %{with_network} %files daemon-config-network %defattr(-, root, root) +%dir %{_datadir}/libvirt/networks/ +%{_datadir}/libvirt/networks/default.xml %endif %if %{with_nwfilter} @@ -1979,8 +1982,6 @@ exit 0 %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/ @@ -1996,6 +1997,8 @@ exit 0 %if %{with_nwfilter} %files daemon-driver-nwfilter %defattr(-, root, root) +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ +%ghost %dir %{_localstatedir}/run/libvirt/network/ %{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so %endif @@ -2015,6 +2018,7 @@ exit 0 %if %{with_qemu} %files daemon-driver-qemu %defattr(-, root, root) +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf %config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf -- 1.8.5.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list