From f37ca0feb54ce0c45a01a09e70655b1c92ad7ee3255a9ac43bc9d78ba21f9832 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 4 Aug 2011 18:00:03 +0000 Subject: [PATCH] libvirt spec file fix OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=138 --- libvirt.spec | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/libvirt.spec b/libvirt.spec index 2a2ea04..2c77c3d 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -148,6 +148,22 @@ # All supported version of openSUSE/SLE contain audit %define with_audit 0%{!?_without_audit:1} +# Disable some drivers when building without libvirt daemon. +# The logic is the same as in configure.ac +%if ! %{with_libvirtd} +%define with_network 0 +%define with_qemu 0 +%define with_lxc 0 +%define with_uml 0 +%define with_hal 0 +%define with_udev 0 +%define with_storage_fs 0 +%define with_storage_lvm 0 +%define with_storage_iscsi 0 +%define with_storage_mpath 0 +%define with_storage_disk 0 +%endif + # Enable libpcap library %if %{with_qemu} %if 0%{?suse_version} >= 1140 @@ -167,12 +183,6 @@ %define with_libnl 1 %endif -# there's no use compiling the network driver without -# the libvirt daemon -%if ! %{with_libvirtd} -%define with_network 0 -%endif - %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services BuildRequires: python-devel @@ -182,6 +192,7 @@ BuildRequires: libxslt BuildRequires: readline-devel BuildRequires: ncurses-devel BuildRequires: gettext +BuildRequires: libtasn1-devel BuildRequires: gnutls-devel BuildRequires: bridge-utils BuildRequires: fdupes @@ -299,7 +310,7 @@ Requires: virt-utils Recommends: bridge-utils # for modprobe of pci devices Requires: module-init-tools -# for /sbin/ip +# for /sbin/ip & /sbin/tc Requires: iproute %endif %if %{with_network} @@ -833,9 +844,11 @@ fi %{_datadir}/libvirt/schemas/interface.rng %{_datadir}/libvirt/schemas/secret.rng %{_datadir}/libvirt/schemas/storageencryption.rng -%{_datadir}/libvirt/cpu_map.xml %{_datadir}/libvirt/schemas/nwfilter.rng %{_datadir}/libvirt/schemas/domainsnapshot.rng +%{_datadir}/libvirt/schemas/basictypes.rng +%{_datadir}/libvirt/schemas/networkcommon.rng +%{_datadir}/libvirt/cpu_map.xml %if %{with_sasl} %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %endif