]> git.pld-linux.org Git - packages/libvirt.git/blobdiff - libvirt.spec
- updated to 1.2.1
[packages/libvirt.git] / libvirt.spec
index 2c2a6d6a1b4640ee52034079eb073568e7fd23e8..6dcf59eee628f2958c5f506f281070cefe802382 100644 (file)
@@ -1,9 +1,13 @@
 #
-# TODO: - seems that lxc patch is not needed anymore, verify that before removing
+# TODO:
+# - kill CFLAGS from libvirt.pc:Libs
+# - 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
+%bcond_without glusterfs       # GlusterFS storage support
 %bcond_without hyperv          # Hyper-V support
 %bcond_without libxl           # libxenlight support
 %bcond_without lxc             # LXC support
 %bcond_without polkit          # PolicyKit support
 %bcond_without qemu            # Qemu support
 %bcond_without sanlock         # sanlock storage lock manager
+%bcond_without systemtap       # systemtap/dtrace probes
 %bcond_without uml             # UML support
 %bcond_without vbox            # VirtualBox support
 %bcond_without vmware          # VMware Workstation/Player support
+%bcond_with    vserver         # Support for Linux-VServer guests
 %bcond_without xenapi          # Xen API (Citrix XenServer) support
 %bcond_without xen             # Xen support
+%bcond_without static_libs     # static libraries build
 
 # qemu available only on x86 and ppc
 %ifnarch %{ix86} %{x8664} ppc
 Summary:       Toolkit to interact with virtualization capabilities
 Summary(pl.UTF-8):     Narzędzia współpracujące z funkcjami wirtualizacji
 Name:          libvirt
-Version:       1.0.0
-Release:       3
+Version:       1.2.1
+Release:       1
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz
-# Source0-md5: 7c8b006de7338e30866bb56738803b21
+# Source0-md5: cce374220f67895afb6331bd2ddedbfd
 Source1:       %{name}.init
 Source2:       %{name}.tmpfiles
 Patch0:                %{name}-sasl.patch
 Patch1:                %{name}-lxc.patch
 Patch2:                %{name}-qemu-acl.patch
 Patch3:                %{name}-xend.patch
-Patch4:                %{name}-xen-4.2.patch
+Patch4:                virtlockd.init.patch
+Patch5:                %{name}-udevadm-settle.patch
+Patch6:                vserver.patch
 URL:           http://www.libvirt.org/
 BuildRequires: audit-libs-devel
 BuildRequires: augeas-devel
@@ -56,10 +65,12 @@ BuildRequires:      dbus-devel >= 1.0.0
 BuildRequires: device-mapper-devel >= 1.0.0
 BuildRequires: gawk
 BuildRequires: gettext-devel >= 0.17
+%{?with_glusterfs:BuildRequires:       glusterfs-devel >= 3.4.1}
 BuildRequires: gnutls-devel >= 1.0.25
 BuildRequires: libapparmor-devel
 BuildRequires: libblkid-devel >= 2.17
 BuildRequires: libcap-ng-devel >= 0.4.0
+BuildRequires: libfuse-devel >= 2.8.6
 BuildRequires: libgcrypt-devel
 BuildRequires: libnl-devel >= 3.2
 BuildRequires: libpcap-devel >= 1.0.0
@@ -71,20 +82,18 @@ BuildRequires:      libtool
 BuildRequires: libxml2-devel >= 1:2.6.0
 BuildRequires: libxslt-devel
 BuildRequires: ncurses-devel
-%{?with_netcf:BuildRequires:   netcf-devel >= 0.1.4}
+%{?with_netcf:BuildRequires:   netcf-devel >= 0.2.0}
 BuildRequires: numactl-devel
 BuildRequires: openldap-devel
 BuildRequires: openwsman-devel >= 2.2.3
 BuildRequires: parted-devel >= 1.8.0
 BuildRequires: perl-tools-pod
-%{?with_polkit:BuildRequires:  polkit >= 0.90}
+%{?with_polkit:BuildRequires:  polkit-devel >= 0.90}
 BuildRequires: pkgconfig
-BuildRequires: python
-BuildRequires: python-devel
 BuildRequires: readline-devel
-BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.627
 %{?with_sanlock:BuildRequires: sanlock-devel >= 0.8}
+%{?with_systemtap:BuildRequires:       systemtap-sdt-devel}
 BuildRequires: udev-devel >= 1:145
 %{?with_xen:BuildRequires:     xen-devel >= 4.2}
 # For disk driver
@@ -153,7 +162,7 @@ Requires:   libselinux-devel >= 2.0.82
 Requires:      libxml2-devel >= 1:2.6.0
 Requires:      numactl-devel
 Requires:      openwsman-devel >= 2.2.3
-%{?with_xen:Requires: xen-devel}
+%{?with_xen:Requires: xen-devel >= 4.2}
 Requires:      yajl-devel
 
 %description devel
@@ -190,29 +199,11 @@ obecnych wersji Linuksa.
 Ten pakiet zawiera biblioteki statyczne do tworzenia programów
 wykorzystujących bibliotekę libvirt.
 
-%package -n python-%{name}
-Summary:       Python bindings to interact with virtualization capabilities
-Summary(pl.UTF-8):     Wiązania Pythona do współpracy z funkcjami wirtualizacji
-Group:         Development/Languages/Python
-Requires:      %{name} = %{version}-%{release}
-
-%description -n        python-%{name}
-Libvirt is a C toolkit to interact with the virtualization
-capabilities of recent versions of Linux.
-
-This package contains the Python bindings for the libvirt library.
-
-%description -n        python-%{name} -l pl.UTF-8
-Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji
-obecnych wersji Linuksa.
-
-Ten pakiet zawiera wiązania Pythona do biblioteki libvirt.
-
 %package lock-sanlock
 Summary:       Sanlock lock manager plugin for libvirt
 Summary(pl.UTF-8):     Zarządca blokad sanlock dla biblioteki libvirt
 Group:         Libraries
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-daemon = %{version}-%{release}
 
 %description lock-sanlock
 Sanlock lock manager plugin for libvirt.
@@ -228,8 +219,7 @@ Requires:   %{name} = %{version}-%{release}
 Requires:      avahi-libs >= 0.6.0
 Requires:      iproute2
 Requires:      libblkid >= 2.17
-Provides:      libvirt(hypervisor)
-%{?with_netcf:Requires:        netcf >= 0.1.4}
+%{?with_netcf:Requires:        netcf >= 0.2.0}
 Requires:      parted-libs >= 1.8.0
 # Needed for probing the power management features of the host.
 Requires:      pm-utils
@@ -238,6 +228,7 @@ Requires:   udev-libs >= 1:145
 Requires:      util-linux
 Requires:      virtual(module-tools)
 Requires:      xorg-lib-libpciaccess >= 0.10.0
+Provides:      libvirt(hypervisor)
 Requires(post):        systemd-units
 Requires(preun):       systemd-units
 Requires(postun):      systemd-units
@@ -293,6 +284,7 @@ Summary:    Server side driver required to run LXC guests
 Summary(pl.UTF-8):     Sterownik wymagany po stronie serwera do uruchamiania gości LXC
 Group:         Libraries
 Requires:      %{name}-daemon = %{version}-%{release}
+Requires:      libfuse >= 2.8.6
 Provides:      libvirt(hypervisor)
 
 %description daemon-lxc
@@ -309,10 +301,10 @@ Summary(pl.UTF-8):        Sterownik wymagany po stronie serwera do uruchamiania gości
 Group:         Libraries
 Requires:      %{name}-daemon = %{version}-%{release}
 Requires:      /usr/bin/qemu-img
-Requires:      qemu
 Requires:      bzip2
 Requires:      gzip
 Requires:      lzop
+Requires:      qemu
 Requires:      xz
 Provides:      libvirt(hypervisor)
 
@@ -361,6 +353,7 @@ wirtualizacji XEN.
 Summary:       Client side utilities of the libvirt library
 Summary(pl.UTF-8):     Narzędzia klienckie do biblioteki libvirt
 Group:         Applications/System
+Requires:      %{name} = %{version}-%{release}
 Requires:      gettext >= 0.18.1.1-6
 Requires:      gnutls >= 1.0.25
 Requires:      netcat-openbsd
@@ -401,6 +394,19 @@ obecnych wersji Linuksa.
 To jest metapakiet zbierający wszystkie narzędzia przeznaczone dla
 biblioteki libvirt.
 
+%package -n systemtap-libvirt
+Summary:       systemtap/dtrace probes for libvirt
+Summary(pl.UTF-8):     Sondy systemtap/dtrace dla libvirt
+Group:         Development/Tools
+Requires:      %{name} = %{version}-%{release}
+Requires:      systemtap-client
+
+%description -n systemtap-libvirt
+systemtap/dtrace probes for libvirt.
+
+%description -n systemtap-libvirt -l pl.UTF-8
+Sondy systemtap/dtrace dla libvirt.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -409,12 +415,8 @@ biblioteki libvirt.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-
-# weird translations
-%{__rm} po/{my,eu_ES}.{po,gmo}
-
-mv po/vi_VN.po po/vi.po
-mv po/vi_VN.gmo po/vi.gmo
+%patch5 -p1
+%{?with_vserver:%patch6 -p1}
 
 %build
 %{__libtoolize}
@@ -457,53 +459,55 @@ mv po/vi_VN.gmo po/vi.gmo
        NUMAD=/usr/bin/numad \
        COLLIE=/usr/sbin/collie \
        --disable-silent-rules \
+       %{?with_static_libs:--enable-static} \
        --with-html-dir=%{_gtkdocdir} \
        --with-html-subdir=%{name} \
-       --with-init-script=redhat \
+       --with-init-script=systemd+redhat \
+       --with-packager="PLD-Linux" \
+       --with-packager-version="%{name}-%{version}-%{release}.%{_target_cpu}" \
+       --with-qemu-user=qemu \
+       --with-qemu-group=qemu \
        --with-storage-disk \
        --with-storage-fs \
+       --with-storage-gluster%{!?with_glusterfs:=no} \
        --with-storage-iscsi \
        --with-storage-lvm \
        --with-storage-mpath \
        --with-storage-rbd%{!?with_ceph:=no} \
        --with-storage-scsi \
        --with-storage-sheepdog \
-       --with-macvtap \
-       --with-virtualport \
-       --with-udev \
-       --with-libssh2 \
-       --with-avahi \
-       --with-audit \
-       --with-libblkid \
-       --with-macvtap \
-       --with-virtualport \
-       --with-numad \
-       --with-numactl \
-       --with-sasl \
-       --with-yajl \
-       --with-selinux \
        --with-apparmor \
-       --with-qemu-user=qemu \
-       --with-qemu-group=qemu \
-       --without-hal \
-       --with-driver-modules \
-       %{__with_without polkit} \
+       --with-audit \
+       --with-avahi \
+       %{__with_without systemtap dtrace} \
        %{__with_without esx} \
+       --with-driver-modules \
+       --without-hal \
        %{__with_without hyperv} \
+       --with-blkid \
+       --with-ssh2 \
        %{__with_without libxl} \
        %{__with_without lxc} \
+       --with-macvtap \
        %{__with_without netcf} \
+       --with-numactl \
+       --with-numad \
        %{__with_without openvz} \
        %{__with_without phyp} \
+       %{__with_without polkit} \
        %{__with_without qemu} \
        %{__with_without sanlock} \
+       --with-sasl \
+       --with-selinux \
+       --with-udev \
        %{__with_without uml} \
        %{__with_without vbox vbox %{_libdir}/VirtualBox} \
+       --with-virtualport \
        %{__with_without vmware} \
        %{__with_without xen} \
        %{__with_without xenapi} \
-       --x-libraries=%{_libdir} \
-       --with-init-script=systemd
+       --with-yajl \
+       --x-libraries=%{_libdir}
 
 %{__make} \
        AWK=gawk
@@ -520,18 +524,19 @@ install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} \
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd
 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_postclean
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la
-
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.{a,la}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la \
+       %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a}
 
 %if %{with sanlock}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.{a,la}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la \
+       %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a}
 %endif
 
+%{__mv} $RPM_BUILD_ROOT%{_localedir}/{eu_ES,eu}
+# duplicate of vi, just one less message translated
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/vi_VN
+
 %find_lang %{name}
 
 %clean
@@ -566,17 +571,24 @@ NORESTART=1
 %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
+%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
+%{_datadir}/libvirt/libvirtLogo.png
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libvirt.so
-%attr(755,root,root) %{_libdir}/libvirt-qemu.so
+%{?with_lxc:%attr(755,root,root) %{_libdir}/libvirt-lxc.so}
+%{?with_qemu:%attr(755,root,root) %{_libdir}/libvirt-qemu.so}
 %{_datadir}/%{name}/api
 %{_gtkdocdir}/%{name}
 %{_includedir}/%{name}
@@ -585,22 +597,14 @@ NORESTART=1
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libvirt.a
-%{_libdir}/libvirt-qemu.a
-
-%files -n python-%{name}
-%defattr(644,root,root,755)
-%doc %{_docdir}/%{name}-python-%{version}
-%attr(755,root,root) %{py_sitedir}/libvirtmod.so
-%attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so
-%{py_sitedir}/libvirt.py[co]
-%{py_sitedir}/libvirt_qemu.py[co]
+%{?with_lxc:%{_libdir}/libvirt-lxc.a}
+%{?with_qemu:%{_libdir}/libvirt-qemu.a}
 
 %if %{with sanlock}
 %files lock-sanlock
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/virt-sanlock-cleanup
 %attr(755,root,root) %{_libdir}/libvirt_sanlock_helper
-%dir %{_libdir}/libvirt/lock-driver
 %attr(755,root,root) %{_libdir}/libvirt/lock-driver/sanlock.so
 %{_datadir}/augeas/lenses/libvirt_sanlock.aug
 %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
@@ -617,23 +621,38 @@ NORESTART=1
 %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,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/nwfilter/*.xml
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/libvirt.conf
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd
+%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
 %{systemdunitdir}/libvirtd.service
-%config(noreplace) %verify(not md5 mtime size) /etc/sysctl.d/libvirtd
+%{systemdunitdir}/virtlockd.service
+%{systemdunitdir}/virtlockd.socket
+%config(noreplace) %verify(not md5 mtime size) /usr/lib/sysctl.d/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
 %attr(755,root,root) %{_libdir}/virt-aa-helper
 %attr(755,root,root) %{_sbindir}/libvirtd
+%attr(755,root,root) %{_sbindir}/virtlockd
 %{_datadir}/augeas/lenses/libvirtd.aug
+%{_datadir}/augeas/lenses/libvirt_lockd.aug
+%{_datadir}/augeas/lenses/virtlockd.aug
 %{_datadir}/augeas/lenses/tests/test_libvirtd.aug
-%{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy}
+%{_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
+%endif
 %{_mandir}/man8/libvirtd.8*
+%{_mandir}/man8/virtlockd.8*
 %dir /var/lib/libvirt
 %dir /var/lib/libvirt/dnsmasq
 %attr(711,root,root) %dir /var/lib/libvirt/boot
@@ -646,12 +665,16 @@ NORESTART=1
 %dir /var/run/libvirt/network
 %{systemdtmpfilesdir}/%{name}.conf
 %dir %{_libdir}/libvirt/connection-driver
+%{_datadir}/libvirt/cpu_map.xml
 %{?with_netcf:%attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_interface.so}
 %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_network.so
 %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_nodedev.so
 %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_nwfilter.so
 %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_secret.so
 %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_storage.so
+%attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_vbox.so
+%dir %{_libdir}/libvirt/lock-driver
+%attr(755,root,root) %{_libdir}/libvirt/lock-driver/lockd.so
 
 %if %{with libxl}
 %files daemon-libxl
@@ -711,15 +734,18 @@ NORESTART=1
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests
 %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests
 %{systemdunitdir}/libvirt-guests.service
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/virt-login-shell.conf
 %attr(755,root,root) %{_bindir}/virsh
 %attr(755,root,root) %{_bindir}/virt-host-validate
+%attr(4755,root,root) %{_bindir}/virt-login-shell
 %attr(755,root,root) %{_bindir}/virt-xml-validate
 %attr(755,root,root) %{_bindir}/virt-pki-validate
+%attr(754,root,root) %{_libexecdir}/libvirt-guests.sh
 %{_mandir}/man1/virsh.1*
 %{_mandir}/man1/virt-host-validate.1*
+%{_mandir}/man1/virt-login-shell.1*
 %{_mandir}/man1/virt-xml-validate.1*
 %{_mandir}/man1/virt-pki-validate.1*
-%{_datadir}/libvirt/cpu_map.xml
 %dir %{_datadir}/libvirt/schemas
 %{_datadir}/libvirt/schemas/basictypes.rng
 %{_datadir}/libvirt/schemas/capability.rng
@@ -733,8 +759,17 @@ NORESTART=1
 %{_datadir}/libvirt/schemas/nwfilter.rng
 %{_datadir}/libvirt/schemas/secret.rng
 %{_datadir}/libvirt/schemas/storageencryption.rng
+%{_datadir}/libvirt/schemas/storagefilefeatures.rng
 %{_datadir}/libvirt/schemas/storagepool.rng
 %{_datadir}/libvirt/schemas/storagevol.rng
 
 %files utils
 %defattr(644,root,root,755)
+
+%if %{with systemtap}
+%files -n systemtap-libvirt
+%defattr(644,root,root,755)
+%{_datadir}/systemtap/tapset/libvirt_functions.stp
+%{_datadir}/systemtap/tapset/libvirt_probes.stp
+%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp
+%endif
This page took 0.050586 seconds and 4 git commands to generate.