[glusterfs] remove unused requires for xlator .so files and private libraries

Niels de Vos devos at fedoraproject.org
Mon Apr 15 16:04:30 UTC 2013


commit 679594f4f88348cac70268192ae224d65617c91e
Author: Niels de Vos <devos at fedoraproject.org>
Date:   Mon Apr 15 18:00:45 2013 +0200

    remove unused requires for xlator .so files and private libraries
    
    Related to the previous commit, just making sure that the packages do
    not have an automatically generated requires for the <xlator>.so that
    the package carries itself.

 glusterfs.spec |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/glusterfs.spec b/glusterfs.spec
index 96e7b5c..24ad213 100644
--- a/glusterfs.spec
+++ b/glusterfs.spec
@@ -139,14 +139,20 @@ Provides:         %{name}-libs = %{version}-%{release}
 Provides:         %{name}-common = %{version}-%{release}
 Provides:         %{name}-core = %{version}-%{release}
 
-# We do not want to generate useless provides for xlator .so files
+# We do not want to generate useless provides and requires for xlator .so files
+# Filter all generated:
+# - .so requires that do not start with 'lib'
+# - all provides from xlators and private libraries not in the ldconfig path
+#
 # TODO: RHEL5 does not have a convenient solution
 %if 0%{?rhel} == 6
     # filter_setup exists in RHEL6 only
     %filter_provides_in %{_libdir}/glusterfs/%{version}/
+    %global __filter_from_req %{?__filter_from_req} | %{__grep} -v -P '^(?!lib).*\.so.*$'
     %filter_setup
 %else
     # modern rpm and current Fedora
+    %global __requires_exclude -P ^(?!lib).*\.so.*$
     %global __provides_exclude_from ^%{_libdir}/glusterfs/%{version}/.*$
 %endif
 


More information about the scm-commits mailing list