SHA256
1
0
forked from pool/libvirt

- Following the upstream pattern, introduce the

daemon-config-network subpackage to handle defining the default
  network
  bnc#859041

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=343
This commit is contained in:
James Fehlig 2014-01-21 00:43:47 +00:00 committed by Git OBS Bridge
parent 0e53c763a0
commit db81eba56f
2 changed files with 38 additions and 10 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jan 20 17:40:10 MST 2014 - jfehlig@suse.com
- Following the upstream pattern, introduce the
daemon-config-network subpackage to handle defining the default
network
bnc#859041
-------------------------------------------------------------------
Fri Jan 17 12:30:48 MST 2014 - jfehlig@suse.com

View File

@ -241,6 +241,9 @@ Group: Development/Libraries/C and C++
%if %{with_libvirtd}
Requires: libvirt-daemon = %{version}-%{release}
%if %{with_network}
Requires: libvirt-daemon-config-network = %{version}-%{release}
%endif
%if %{with_nwfilter}
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
%endif
@ -513,6 +516,17 @@ Server side daemon required to manage the virtualization capabilities
of recent versions of Linux. Requires a hypervisor specific sub-RPM
for specific drivers.
%if %{with_network}
%package daemon-config-network
Summary: Default configuration files for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
%description daemon-config-network
Default configuration files for setting up NAT based networking
%endif
%if %{with_nwfilter}
%package daemon-config-nwfilter
@ -1291,16 +1305,6 @@ fi
%post daemon
/sbin/ldconfig
%if %{with_network}
# Install the default network if one doesn't exist
if test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
then
UUID=`/usr/bin/uuidgen`
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
< %{_datadir}/libvirt/networks/default.xml \
> %{_sysconfdir}/libvirt/qemu/networks/default.xml
fi
%endif
%if %{with_systemd}
%service_add_post libvirtd.service
%service_add_post virtlockd.service virtlockd.socket
@ -1329,6 +1333,17 @@ fi
%restart_on_update libvirtd
%restart_on_update virtlockd
%insserv_cleanup
%if %{with_network}
%post daemon-config-network
# Install the default network if one doesn't exist
if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
UUID=`/usr/bin/uuidgen`
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
< %{_datadir}/libvirt/networks/default.xml \
> %{_sysconfdir}/libvirt/qemu/networks/default.xml
fi
%endif
%endif # with_libvirtd
%post client
@ -1468,6 +1483,11 @@ fi
%endif
%endif # ! %{with_driver_modules}
%if %{with_network}
%files daemon-config-network
%defattr(-, root, root)
%endif
%if %{with_nwfilter}
%files daemon-config-nwfilter