]> xenbits.xensource.com Git - libvirt.git/commitdiff
Push RPM deps down into libvirt-daemon-driver-XXXX sub-RPMs
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Oct 2013 11:27:45 +0000 (11:27 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Oct 2013 14:31:18 +0000 (14:31 +0000)
For inexplicable reasons, many of the 3rd party package deps
were left against the 'libvirt-daemon' RPM when the drivers
were split out. This makes a minimal install heavier that
it should be. Push them all down into libvirt-daemon-driver-XXX
so they're only pulled in when truly needed

With this change applied, a minimal install of just the
libvirt-daemon-driver-lxc RPM is reduced by 41 MB on a
Fedora 19 host.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
libvirt.spec.in

index fb4d46f8f2bf017f742da1204a8cb88a4a8c65d7..48feea56e5ffef641237d10431e3a6907f0b1570 100644 (file)
@@ -657,31 +657,6 @@ Requires: avahi
 Requires: avahi-libs
         %endif
     %endif
-    %if %{with_network}
-Requires: dnsmasq >= 2.41
-Requires: radvd
-    %endif
-    %if %{with_network} || %{with_nwfilter}
-Requires: iptables
-Requires: iptables-ipv6
-    %endif
-    %if %{with_nwfilter}
-Requires: ebtables
-    %endif
-    %if %{with_netcf} && (0%{?fedora} >= 18 || 0%{?rhel} >= 7)
-Requires: netcf-libs >= 0.2.2
-    %endif
-# needed for device enumeration
-    %if %{with_hal}
-Requires: hal
-    %endif
-    %if %{with_udev}
-        %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
-Requires: systemd >= 185
-        %else
-Requires: udev >= 145
-        %endif
-    %endif
     %if %{with_polkit}
         %if 0%{?fedora} >= 12 || 0%{?rhel} >=6
 Requires: polkit >= 0.93
@@ -689,50 +664,6 @@ Requires: polkit >= 0.93
 Requires: PolicyKit >= 0.6
         %endif
     %endif
-    %if %{with_storage_fs}
-Requires: nfs-utils
-# For mkfs
-Requires: util-linux
-# For glusterfs
-        %if 0%{?fedora} >= 11
-Requires: glusterfs-client >= 2.0.1
-        %endif
-    %endif
-    %if %{with_qemu}
-# From QEMU RPMs
-Requires: /usr/bin/qemu-img
-# For image compression
-Requires: gzip
-Requires: bzip2
-Requires: lzop
-Requires: xz
-    %else
-        %if %{with_xen}
-# From Xen RPMs
-Requires: /usr/sbin/qcow-create
-        %endif
-    %endif
-    %if %{with_storage_lvm}
-# For LVM drivers
-Requires: lvm2
-    %endif
-    %if %{with_storage_iscsi}
-# For ISCSI driver
-Requires: iscsi-initiator-utils
-    %endif
-    %if %{with_storage_disk}
-# For disk driver
-Requires: parted
-Requires: device-mapper
-    %endif
-    %if %{with_storage_mpath}
-# For multipath support
-Requires: device-mapper
-    %endif
-    %if %{with_storage_sheepdog}
-# For Sheepdog support
-Requires: sheepdog
-    %endif
     %if %{with_cgconfig}
 Requires: libcgroup
     %endif
@@ -788,6 +719,10 @@ Network filter configuration files for cleaning guest traffic
 Summary: Network driver plugin for the libvirtd daemon
 Group: Development/Libraries
 Requires: libvirt-daemon = %{version}-%{release}
+Requires: dnsmasq >= 2.41
+Requires: radvd
+Requires: iptables
+Requires: iptables-ipv6
 
 %description daemon-driver-network
 The network driver plugin for the libvirtd daemon, providing
@@ -801,6 +736,9 @@ bridge capabilities.
 Summary: Nwfilter driver plugin for the libvirtd daemon
 Group: Development/Libraries
 Requires: libvirt-daemon = %{version}-%{release}
+Requires: iptables
+Requires: iptables-ipv6
+Requires: ebtables
 
 %description daemon-driver-nwfilter
 The nwfilter driver plugin for the libvirtd daemon, providing
@@ -814,6 +752,17 @@ iptables and ip6tables capabilities
 Summary: Nodedev driver plugin for the libvirtd daemon
 Group: Development/Libraries
 Requires: libvirt-daemon = %{version}-%{release}
+# needed for device enumeration
+            %if %{with_hal}
+Requires: hal
+            %endif
+            %if %{with_udev}
+                %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
+Requires: systemd >= 185
+                %else
+Requires: udev >= 145
+                %endif
+            %endif
 
 %description daemon-driver-nodedev
 The nodedev driver plugin for the libvirtd daemon, providing
@@ -827,6 +776,9 @@ capabilities.
 Summary: Interface driver plugin for the libvirtd daemon
 Group: Development/Libraries
 Requires: libvirt-daemon = %{version}-%{release}
+            %if %{with_netcf} && (0%{?fedora} >= 18 || 0%{?rhel} >= 7)
+Requires: netcf-libs >= 0.2.2
+            %endif
 
 %description daemon-driver-interface
 The interface driver plugin for the libvirtd daemon, providing
@@ -850,6 +802,45 @@ an implementation of the secret key APIs.
 Summary: Storage driver plugin for the libvirtd daemon
 Group: Development/Libraries
 Requires: libvirt-daemon = %{version}-%{release}
+            %if %{with_storage_fs}
+Requires: nfs-utils
+# For mkfs
+Requires: util-linux
+# For glusterfs
+                %if 0%{?fedora} >= 11
+Requires: glusterfs-client >= 2.0.1
+                %endif
+            %endif
+            %if %{with_storage_lvm}
+# For LVM drivers
+Requires: lvm2
+            %endif
+            %if %{with_storage_iscsi}
+# For ISCSI driver
+Requires: iscsi-initiator-utils
+            %endif
+            %if %{with_storage_disk}
+# For disk driver
+Requires: parted
+Requires: device-mapper
+            %endif
+            %if %{with_storage_mpath}
+# For multipath support
+Requires: device-mapper
+            %endif
+            %if %{with_storage_sheepdog}
+# For Sheepdog support
+Requires: sheepdog
+            %endif
+            %if %{with_qemu}
+# From QEMU RPMs
+Requires: /usr/bin/qemu-img
+            %else
+                %if %{with_xen}
+# From Xen RPMs
+Requires: /usr/sbin/qcow-create
+                %endif
+            %endif
 
 %description daemon-driver-storage
 The storage driver plugin for the libvirtd daemon, providing
@@ -865,6 +856,12 @@ Group: Development/Libraries
 Requires: libvirt-daemon = %{version}-%{release}
 # There really is a hard cross-driver dependency here
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
+Requires: /usr/bin/qemu-img
+# For image compression
+Requires: gzip
+Requires: bzip2
+Requires: lzop
+Requires: xz
 
 %description daemon-driver-qemu
 The qemu driver plugin for the libvirtd daemon, providing