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:
parent
0e53c763a0
commit
db81eba56f
@ -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
|
Fri Jan 17 12:30:48 MST 2014 - jfehlig@suse.com
|
||||||
|
|
||||||
|
40
libvirt.spec
40
libvirt.spec
@ -241,6 +241,9 @@ Group: Development/Libraries/C and C++
|
|||||||
|
|
||||||
%if %{with_libvirtd}
|
%if %{with_libvirtd}
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
|
%if %{with_network}
|
||||||
|
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
||||||
|
%endif
|
||||||
%if %{with_nwfilter}
|
%if %{with_nwfilter}
|
||||||
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
|
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
|
||||||
%endif
|
%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
|
of recent versions of Linux. Requires a hypervisor specific sub-RPM
|
||||||
for specific drivers.
|
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}
|
%if %{with_nwfilter}
|
||||||
|
|
||||||
%package daemon-config-nwfilter
|
%package daemon-config-nwfilter
|
||||||
@ -1291,16 +1305,6 @@ fi
|
|||||||
|
|
||||||
%post daemon
|
%post daemon
|
||||||
/sbin/ldconfig
|
/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}
|
%if %{with_systemd}
|
||||||
%service_add_post libvirtd.service
|
%service_add_post libvirtd.service
|
||||||
%service_add_post virtlockd.service virtlockd.socket
|
%service_add_post virtlockd.service virtlockd.socket
|
||||||
@ -1329,6 +1333,17 @@ fi
|
|||||||
%restart_on_update libvirtd
|
%restart_on_update libvirtd
|
||||||
%restart_on_update virtlockd
|
%restart_on_update virtlockd
|
||||||
%insserv_cleanup
|
%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
|
%endif # with_libvirtd
|
||||||
|
|
||||||
%post client
|
%post client
|
||||||
@ -1468,6 +1483,11 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%endif # ! %{with_driver_modules}
|
%endif # ! %{with_driver_modules}
|
||||||
|
|
||||||
|
%if %{with_network}
|
||||||
|
%files daemon-config-network
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with_nwfilter}
|
%if %{with_nwfilter}
|
||||||
|
|
||||||
%files daemon-config-nwfilter
|
%files daemon-config-nwfilter
|
||||||
|
Loading…
Reference in New Issue
Block a user