[bugzilla] Move to the current filtering system for provides and requires

Emmanuel Seyman eseyman at fedoraproject.org
Sat Jan 29 13:02:05 UTC 2011


commit d0883e01ce4ca6498edf96646ec56413c086cb61
Author: Emmanuel Seyman <emmanuel.seyman at club-internet.fr>
Date:   Sat Jan 29 14:01:54 2011 +0100

    Move to the current filtering system for provides and requires

 bugzilla.spec |   49 +++++++++++++++++++------------------------------
 1 files changed, 19 insertions(+), 30 deletions(-)
---
diff --git a/bugzilla.spec b/bugzilla.spec
index d61f91b..cfdc62b 100644
--- a/bugzilla.spec
+++ b/bugzilla.spec
@@ -6,7 +6,7 @@ URL: http://www.bugzilla.org/
 Name: bugzilla
 Version: 3.6.4
 Group: Applications/Publishing
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: MPLv1.1
 Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-%{version}.tar.gz
 Source1: bugzilla-httpd-conf
@@ -44,6 +44,20 @@ Summary: Bugzilla contributed scripts
 Group: Applications/Publishing
 BuildRequires: python
 
+# Remove all optional modules from the requires stream
+%filter_from_requires /perl(Authen::Radius)/d; /perl(DBD::Pg)/d; /perl(DBD::Oracle)/d;
+%filter_from_requires /perl(sanitycheck.cgi)/d; /perl(Apache2::Const)/d;
+%filter_from_requires /perl(Apache2::ServerUtil)/d; /perl(ModPerl::RegistryLoader)/d;
+%filter_from_requires /perl(CPAN)/d; /perl(Net::LDAP)/d; /perl(Email::Reply)/d;
+%filter_from_requires /perl(Email::MIME::Attachment::Stripper)/d; /perl(Email::MIME::Modifier)/d;
+%filter_from_requires /perl(Image::Magick)/d; /perl(Test::Harness)/d; /perl(Test::Taint)/d;
+%filter_from_requires /perl(XML::Twig)/d; /perl(XMLRPC::Lite)/d; /perl(XMLRPC::Transport::HTTP)/d;
+
+# Remove extensions from the provides stream
+%filter_from_provides /perl(Bugzilla::Extension::BmpConvert)/d; /perl(Bugzilla::Extension::Example)/d;
+
+%{?perl_default_filter}
+
 %description
 Bugzilla is a popular bug tracking system used by multiple open source projects
 It requires a database engine installed - either MySQL, PostgreSQL or Oracle.
@@ -65,35 +79,7 @@ Contributed scripts and functions for Bugzilla
 # patch1 -p0
 rm -f Bugzilla/Constants.pm.orig
 # Remove bundled libs
-rm -rf lib
-
-# Filter unwanted Requires found by /usr/lib/rpm/perldeps.pl:
-# create a wrapper script which runs the original perl_requires
-# command and strips some of the output
-cat << \EOF > %{name}-req
-#!/bin/sh
-%{__perl_requires} $* |\
-sed -e '/perl(Authen::Radius)/d' -e '/perl(DBD::Pg)/d' -e '/perl(DBD::Oracle)/d' -e '/perl(sanitycheck.cgi)/d' |\
-sed -e '/perl(Apache2::Const)/d' -e '/perl(Apache2::ServerUtil)/d' -e '/perl(ModPerl::RegistryLoader)/d' |\
-sed -e '/perl(CPAN)/d' -e '/perl(Net::LDAP)/d' -e '/perl(Email::Reply)/d' |\
-sed -e '/perl(Email::MIME::Attachment::Stripper)/d' -e '/perl(Email::MIME::Modifier)/d' |\
-sed -e '/perl(Image::Magick)/d' -e '/perl(Test::Harness)/d' -e '/perl(Test::Taint)/d' |\
-sed -e '/perl(XML::Twig)/d' -e '/perl(XMLRPC::Lite)/d' -e '/perl(XMLRPC::Transport::HTTP)/d'
-EOF
-
-# use that wrapper script instead of the original perl_requires script
-%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
-chmod +x %{__perl_requires}
-
-# Filter unwanted provides
-cat << \EOF > %{name}-prov
-#!/bin/sh
-%{__perl_provides} $* |\
-sed -e '/perl(Bugzilla::Extension::BmpConvert)/d' -e '/perl(Bugzilla::Extension::Example)/d'
-EOF
-
-%global __perl_provides %{_builddir}/%{name}-%{version}/%{name}-prov
-chmod +x %{__perl_provides}
+rm -rf lib/*
 
 # Deal with changing /usr/local paths here instead of via patches
 %{__perl} -pi -e 's|/usr/local/bin/python\b|%{__python}|' contrib/*.py
@@ -186,6 +172,9 @@ popd > /dev/null)
 %{bzinstallprefix}/bugzilla/contrib
 
 %changelog
+* Sat Jan 29 2011 Emmanuel Seyman <emmanuel.seyman at club-internet.fr> - 3.6.4-2
+- Move to the current filtering system for provides and requires
+
 * Tue Jan 25 2011 Emmanuel Seyman <emmanuel.seyman at club-internet.fr> - 3.6.4-1
 - Update to 3.6.4
 


More information about the scm-commits mailing list