[PATCH] Push RPM deps down into libvirt-daemon-driver-XXXX sub-RPMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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 truely 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.

Fedora cloud team has requested that we cut down minimal
libvirt install size as much as is possible. Fixing these
deps is the biggest win without coding work, per:

  https://bugzilla.redhat.com/show_bug.cgi?id=1012198

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 libvirt.spec.in | 135 +++++++++++++++++++++++++++-----------------------------
 1 file changed, 66 insertions(+), 69 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index fb4d46f..48feea5 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -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
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]