+# TODO:
+# - wireshark-dissector
+# - seems that lxc patch is not needed anymore, verify that before removing
+# - pldize virtlockd.init
+#
# Conditional build:
%bcond_without ceph # RADOS BD (Ceph) storage support
%bcond_without esx # VMware ESX support
%ifnarch %{ix86} %{x8664} ppc
%undefine with_qemu
%endif
+
# Xen is available only on x86 and ia64
%ifnarch %{ix86} %{x8664} ia64
%undefine with_xen
+%undefine with_xenapi
+%undefine with_libxl
%endif
Summary: Toolkit to interact with virtualization capabilities
Summary(pl.UTF-8): Narzędzia współpracujące z funkcjami wirtualizacji
Name: libvirt
-Version: 1.2.14
+Version: 1.2.17
Release: 1
License: LGPL v2.1+
Group: Libraries
Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz
-# Source0-md5: 983345c4ee6535437a6ba408dd59289a
+# Source0-md5: a1f49050223be3cbd7678c32b1ee2756
Source1: %{name}.init
Patch0: %{name}-sasl.patch
Patch1: %{name}-lxc.patch
Patch5: %{name}-udevadm-settle.patch
Patch6: vserver.patch
Patch7: bashisms.patch
-Patch8: libvirt-guests.init.patch
+Patch8: %{name}-guests.init.patch
URL: http://www.libvirt.org/
BuildRequires: audit-libs-devel
BuildRequires: augeas-devel
BuildRequires: dbus-devel >= 1.0.0
BuildRequires: device-mapper-devel >= 1.0.0
BuildRequires: gawk
-BuildRequires: gettext-devel >= 0.17
+BuildRequires: gettext-tools >= 0.17
%{?with_glusterfs:BuildRequires: glusterfs-devel >= 3.4.1}
BuildRequires: gnutls-devel >= 1.0.25
BuildRequires: libapparmor-devel
%{?with_netcf:BuildRequires: netcf-devel >= 0.2.0}
BuildRequires: numactl-devel
BuildRequires: openldap-devel
-BuildRequires: openwsman-devel >= 2.2.3
+%{?with_hyperv:BuildRequires: openwsman-devel >= 2.2.3}
BuildRequires: parted-devel >= 1.8.0
BuildRequires: pkgconfig
BuildRequires: polkit
BuildRequires: rpmbuild(macros) >= 1.627
%{?with_sanlock:BuildRequires: sanlock-devel >= 0.8}
%{?with_systemtap:BuildRequires: systemtap-sdt-devel}
+BuildRequires: sheepdog
BuildRequires: udev-devel >= 1:145
%{?with_xen:BuildRequires: xen-devel >= 4.2}
# For disk driver
Requires: libselinux >= 2.0.82
Requires: libssh2 >= 1.3
Requires: libxml2 >= 1:2.6.0
-Requires: openwsman-libs >= 2.2.3
+%{?with_hyperv:Requires: openwsman-libs >= 2.2.3}
Obsoletes: libvirt-daemon-esx
Obsoletes: libvirt-daemon-hyperv
Obsoletes: libvirt-daemon-openvz
Requires: libselinux-devel >= 2.0.82
Requires: libxml2-devel >= 1:2.6.0
Requires: numactl-devel
-Requires: openwsman-devel >= 2.2.3
+%{?with_hyperv:Requires: openwsman-devel >= 2.2.3}
%{?with_xen:Requires: xen-devel >= 4.2}
Requires: yajl-devel
Requires: libblkid >= 2.17
%{?with_netcf:Requires: netcf >= 0.2.0}
Requires: parted-libs >= 1.8.0
-Requires: rc-scripts
# Needed for probing the power management features of the host.
Requires: pm-utils
+Requires: rc-scripts
+Requires: sheepdog
Requires: udev-libs >= 1:145
Requires: util-linux
Requires: virtual(module-tools)
Suggests: polkit >= 0.93
#Suggests: radvd
Suggests: scrub
-#Suggests: sheepdog
Provides: libvirt(hypervisor)
%description daemon
Requires: bzip2
Requires: gzip
Requires: lzop
-Requires: qemu
+Requires: qemu-system-x86
Requires: xz
Provides: libvirt(hypervisor)
DEVHELP_DIR=%{_gtkdocdir}/%{name}/devhelp \
DESTDIR=$RPM_BUILD_ROOT
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la \
/sbin/chkconfig --del libvirtd
fi
-%postun daemon
-
%post client
/sbin/chkconfig --add libvirt-guests
%service -n libvirt-guests restart
/sbin/chkconfig --del libvirt-guests
fi
-%postun client
-
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc ChangeLog README TODO NEWS
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libvirt.conf
%attr(755,root,root) %{_libdir}/libvirt.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libvirt.so.0
+%attr(755,root,root) %{_libdir}/libvirt-admin.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libvirt-admin.so.0
%if %{with lxc}
%attr(755,root,root) %{_libdir}/libvirt-lxc.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libvirt-lxc.so.0
%endif
-%if %{with qemu}
%attr(755,root,root) %{_libdir}/libvirt-qemu.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libvirt-qemu.so.0
-%endif
%dir %{_libdir}/libvirt
%dir %{_datadir}/libvirt
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libvirt.so
+%attr(755,root,root) %{_libdir}/libvirt-admin.so
%{?with_lxc:%attr(755,root,root) %{_libdir}/libvirt-lxc.so}
-%{?with_qemu:%attr(755,root,root) %{_libdir}/libvirt-qemu.so}
+%attr(755,root,root) %{_libdir}/libvirt-qemu.so
%{_datadir}/%{name}/api
%{_gtkdocdir}/%{name}
%{_includedir}/%{name}
%{_pkgconfigdir}/libvirt.pc
%{?with_lxc:%{_pkgconfigdir}/libvirt-lxc.pc}
-%{?with_qemu:%{_pkgconfigdir}/libvirt-qemu.pc}
+%{_pkgconfigdir}/libvirt-qemu.pc
%files static
%defattr(644,root,root,755)
%{_libdir}/libvirt.a
+%{_libdir}/libvirt-admin.a
%{?with_lxc:%{_libdir}/libvirt-lxc.a}
-%{?with_qemu:%{_libdir}/libvirt-qemu.a}
+%{_libdir}/libvirt-qemu.a
%if %{with sanlock}
%files lock-sanlock
%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
%dir /var/lib/libvirt/sanlock
%{_mandir}/man8/virt-sanlock-cleanup.8*
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu-sanlock.conf
%endif
%files daemon
%dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu/networks
%dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu/networks/autostart
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libvirtd.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu-lockd.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/virtlockd.conf
%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu/networks/default.xml
%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/virtlockd
%attr(754,root,root) /etc/rc.d/init.d/libvirtd
%attr(754,root,root) /etc/rc.d/init.d/virtlockd
-%config(noreplace) %verify(not md5 mtime size) /usr/lib/sysctl.d/libvirtd.conf
+%config(noreplace) %verify(not md5 mtime size) /usr/lib/sysctl.d/60-libvirtd.conf
%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd
%attr(755,root,root) %{_libdir}/libvirt_iohelper
%attr(755,root,root) %{_libdir}/libvirt_parthelper
%{_datadir}/augeas/lenses/libvirt_lockd.aug
%{_datadir}/augeas/lenses/virtlockd.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
-%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
+%{?with_qemu:%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug}
%{_datadir}/augeas/lenses/tests/test_virtlockd.aug
%if %{with polkit}
%{_datadir}/polkit-1/actions/org.libvirt.api.policy
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
+%{_datadir}/polkit-1/rules.d/50-libvirt.rules
%endif
%{_mandir}/man8/libvirtd.8*
%{_mandir}/man8/virtlockd.8*
%if %{with libxl}
%files daemon-libxl
%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libxl.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libxl-lockd.conf
+%{?with_sanlock:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libxl-sanlock.conf}
+%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.libxl
%attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_libxl.so
+%{_datadir}/augeas/lenses/libvirtd_libxl.aug
+%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
%attr(700,root,root) %dir /var/lib/libvirt/libxl
%attr(700,root,root) %dir /var/run/libvirt/libxl
%attr(700,root,root) %dir /var/log/libvirt/libxl
%files daemon-qemu
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu-lockd.conf
+%{?with_sanlock:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu-sanlock.conf}
%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu
%attr(750,qemu,qemu) %dir /var/cache/libvirt/qemu
%attr(750,qemu,qemu) %dir /var/lib/libvirt/qemu