Bug 677660 - perl filtering requires/provides broken
Summary: perl filtering requires/provides broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: redhat-rpm-config
Version: 6.1
Hardware: All
OS: All
high
high
Target Milestone: beta
: ---
Assignee: Florian Festi
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-15 14:10 UTC by Marcela Mašláňová
Modified: 2015-12-09 15:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-09 15:24:42 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Marcela Mašláňová 2011-02-15 14:10:32 UTC
We are using for removal of useless requires/provides macros defined in /etc/rpm/macros.perl. Current RHEL-6.1 doesn't work.

As example we can use perl-XML-SAX. Release built year ago with rpm-4.8.0-4 is working and filtering fine. But even if we downgraded to this version from rpm-4.8.0-12 filtering was still broken.

Filter:
%{?filter_setup:
%filter_from_requires /perl(XML::SAX::PurePerl::\(DTDDecls\|DocType\|EncodingDetect\|XMLDecl\))/d
%filter_from_provides /perl(XML::SAX::PurePerl)/d
%?perl_default_filter
}

Current RHEL-6.1 or brew with 6.1 buildroot:
rpm -qp --provides noarch/perl-XML-SAX-0.96-7.el6.noarch.rpm 
perl(XML::SAX) = 0.96
perl(XML::SAX::Base) = 1.04
perl(XML::SAX::Base::NoHandler)  
perl(XML::SAX::DocumentLocator)  
perl(XML::SAX::Exception) = 1.01
perl(XML::SAX::ParserFactory) = 1.01
perl(XML::SAX::PurePerl)  
perl(XML::SAX::PurePerl) = 0.96
perl(XML::SAX::PurePerl::DebugHandler)  
perl(XML::SAX::PurePerl::Exception)  
perl(XML::SAX::PurePerl::Productions)  
perl(XML::SAX::PurePerl::Reader)  
perl(XML::SAX::PurePerl::Reader::Stream)  
perl(XML::SAX::PurePerl::Reader::String)  
perl(XML::SAX::PurePerl::Reader::URI)  
perl-XML-SAX = 0.96-7.el6

rpm -qp --requires noarch/perl-XML-SAX-0.96-7.el6.noarch.rpm | sort -u
/bin/sh  
perl(Carp)  
perl(constant)  
perl(Encode)  
perl(Exporter)  
perl(File::Basename)  
perl(File::Spec)  
perl(File::Temp)  
perl(IO::File)  
perl(:MODULE_COMPAT_5.10.1)  
perl(overload)  
perl(strict)  
perl(Symbol)  
perl(utf8)  
perl(vars)  
perl(XML::LibXML)  
perl(XML::LibXML::Common)  
perl(XML::NamespaceSupport)  
perl(XML::SAX)  
perl(XML::SAX::Base)  
perl(XML::SAX::DocumentLocator)  
perl(XML::SAX::Exception)  
perl(XML::SAX::ParserFactory)  
perl(XML::SAX::PurePerl::DocType)  
perl(XML::SAX::PurePerl::DTDDecls)  
perl(XML::SAX::PurePerl::EncodingDetect)  
perl(XML::SAX::PurePerl::Productions)  
perl(XML::SAX::PurePerl::Reader)  
perl(XML::SAX::PurePerl::Reader::URI)  
perl(XML::SAX::PurePerl::XMLDecl)  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1

Provides/requires on downloaded RPM from brew (year ago):
rpm -qp --provides perl-XML-SAX-0.96-7.el6.noarch.rpm | sort -u
perl(XML::SAX) = 0.96
perl-XML-SAX = 0.96-7.el6
perl(XML::SAX::Base) = 1.04
perl(XML::SAX::Base::NoHandler)  
perl(XML::SAX::DocumentLocator)  
perl(XML::SAX::Exception) = 1.01
perl(XML::SAX::ParserFactory) = 1.01
perl(XML::SAX::PurePerl::DebugHandler)  
perl(XML::SAX::PurePerl::Exception)  
perl(XML::SAX::PurePerl::Productions)  
perl(XML::SAX::PurePerl::Reader)  
perl(XML::SAX::PurePerl::Reader::Stream)  
perl(XML::SAX::PurePerl::Reader::String)  
perl(XML::SAX::PurePerl::Reader::URI)  

rpm -qp --requires perl-XML-SAX-0.96-7.el6.noarch.rpm | sort -u
/bin/sh  
perl(Carp)  
perl(constant)  
perl(Encode)  
perl(Exporter)  
perl(File::Basename)  
perl(File::Spec)  
perl(File::Temp)  
perl(IO::File)  
perl(:MODULE_COMPAT_5.10.1)  
perl(overload)  
perl(strict)  
perl(Symbol)  
perl(utf8)  
perl(vars)  
perl(XML::LibXML)  
perl(XML::LibXML::Common)  
perl(XML::NamespaceSupport)  
perl(XML::SAX)  
perl(XML::SAX::Base)  
perl(XML::SAX::DocumentLocator)  
perl(XML::SAX::Exception)  
perl(XML::SAX::ParserFactory)  
perl(XML::SAX::PurePerl::Productions)  
perl(XML::SAX::PurePerl::Reader)  
perl(XML::SAX::PurePerl::Reader::URI)  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rpmlib(VersionedDependencies) <= 3.0.3-1

Comment 2 Panu Matilainen 2011-02-15 14:24:51 UTC
(In reply to comment #0)
> As example we can use perl-XML-SAX. Release built year ago with rpm-4.8.0-4 is
> working and filtering fine. But even if we downgraded to this version from
> rpm-4.8.0-12 filtering was still broken.

Kinda proves this is not an rpm bug, doesn't it? Maybe something in redhat-rpm-config has broken the filtering macros .. or something.

Comment 3 Marcela Mašláňová 2011-02-15 15:23:21 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > As example we can use perl-XML-SAX. Release built year ago with rpm-4.8.0-4 is
> > working and filtering fine. But even if we downgraded to this version from
> > rpm-4.8.0-12 filtering was still broken.
> 
> Kinda proves this is not an rpm bug, doesn't it? Maybe something in
> redhat-rpm-config has broken the filtering macros .. or something.

jnovy is looking at this at the moment. Rpm was my first guess, at least you guys know how are macros/filtering working.

Comment 5 Jindrich Novy 2011-02-17 14:55:56 UTC
Well, it seems that redhat-rpm-config (containing essential macros Perl packaging uses) is completely missing from BuildRoot while building perl. We need to assure redhat-rpm-config is present on the system, otherwise the perl build will be broken. (... and will end up with unfiltered Provides/Requires)

Up to now I thought redhat-rpm-config is always installed. What happened it is missing from the base install?

Comment 6 Dennis Gregorovic 2011-02-17 16:00:44 UTC
redhat-rpm-config should be installed in every buildroot.  Which build is missing it?

Comment 7 Marcela Mašláňová 2011-02-18 13:26:17 UTC
I'm sorry about that. Brew buildroot contain rpm-redhat-config.

We had tested the mentioned package locally and in minimal install is not rpm-redhat-config installed. This package doesn't depend on rpmbuild, so it takes a long time to find out what's missing.

Would it be possible to add it as dependency for rpmbuild (or different essential package)? In Fedora we have fedora-packages, which contains this essential macro, so the problem is solved there, but in RHEL could be missing.

Comment 8 Panu Matilainen 2011-02-18 14:07:54 UTC
This keeps coming up at least twice every year :) Making rpm-build require redhat-rpm-config would be "wrong" as rpmbuild does not need redhat-rpm-config to work, r-r-c is basically "Red Hat build policy for rpm". So you want it to be present always when building Fedora/RHEL packages (ie 99% of uses probably), but it'd be perfectly legitimate to want some other policy (eg cross-building for something else).

One possibility could be adding "Provides: rpm-build-policy" or such to redhat-rpm-config, and have rpm-build require the virtual provide. That would fix the common case, but still allow changing the policy by making another (dummy or real) package which provides rpm-build-policy.

Comment 9 Jindrich Novy 2011-02-18 14:20:55 UTC
One other possible solution would be to avoid using the generic auto req/prov filtering macros in redhat-rpm-config for now in Perl packaging guidelines. It could be done via providing custom perl filtering script per each perl package, such as:

# filter perl requires
Source99: my-filter-requires.sh
%define __perl_requires %{SOURCE99}

Alternatively, the generic auto req/prov filtering macros could be moved (if nothing breaks) to the main rpm macros to avoid touching perl packages at all.

Comment 10 Marcela Mašláňová 2011-02-18 14:25:57 UTC
(In reply to comment #9)
> One other possible solution would be to avoid using the generic auto req/prov
> filtering macros in redhat-rpm-config for now in Perl packaging guidelines. It
> could be done via providing custom perl filtering script per each perl package,
> such as:
> 
> # filter perl requires
> Source99: my-filter-requires.sh
> %define __perl_requires %{SOURCE99}
> 
> Alternatively, the generic auto req/prov filtering macros could be moved (if
> nothing breaks) to the main rpm macros to avoid touching perl packages at all.

This type of filter is "old" and we start using macros few releases ago. The mentioned filter stopped working with RPM4.9 for many Perl packages, which were still using it. So that's not a system solution.

Comment 11 Marcela Mašláňová 2011-02-18 14:28:04 UTC
(In reply to comment #8)
> This keeps coming up at least twice every year :) Making rpm-build require
> redhat-rpm-config would be "wrong" as rpmbuild does not need redhat-rpm-config
> to work, r-r-c is basically "Red Hat build policy for rpm". So you want it to
> be present always when building Fedora/RHEL packages (ie 99% of uses probably),
> but it'd be perfectly legitimate to want some other policy (eg cross-building
> for something else).
> 
> One possibility could be adding "Provides: rpm-build-policy" or such to
> redhat-rpm-config, and have rpm-build require the virtual provide. That would
> fix the common case, but still allow changing the policy by making another
> (dummy or real) package which provides rpm-build-policy.

Yes, I know this is not first time, when you see this proposal and it is not optimal solution. I'd rather see some virtual package, which would provide redhat-rpm-config.

Comment 12 Petr Pisar 2011-02-18 14:35:18 UTC
(In reply to comment #9)
> Alternatively, the generic auto req/prov filtering macros could be moved (if
> nothing breaks) to the main rpm macros to avoid touching perl packages at all.

Why not to move them into perl-devel package?

Comment 13 Jindrich Novy 2011-02-21 11:25:29 UTC
(In reply to comment #12)
> (In reply to comment #9)
> > Alternatively, the generic auto req/prov filtering macros could be moved (if
> > nothing breaks) to the main rpm macros to avoid touching perl packages at all.
> 
> Why not to move them into perl-devel package?

These macros are general, not suitable for Perl usage only. So I believe they belong either in rpm or redhat-rpm-config.

Comment 14 RHEL Program Management 2011-04-04 02:03:25 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 15 RHEL Program Management 2011-07-19 18:58:07 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 16 RHEL Program Management 2011-10-07 16:03:57 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 17 RHEL Program Management 2012-12-14 07:31:13 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 19 Marcela Mašláňová 2013-05-13 16:28:17 UTC
I don't think it will be fixed in RHEL-6. It's more possible, that it won't be fixed at all. You can close it.

Comment 20 RHEL Program Management 2013-10-14 01:10:31 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 22 Petr Pisar 2015-10-12 13:44:43 UTC
I agree that having installed redhat-rpm-config for building RHEL packages is an axiom. The only dependency to add that could make sense is requiring redhat-rpm-config by all packages that directly use a macro defined by the the redhat-rpm-config. But because it's a granted assumption, it's not so important here.

I agree that redhat-rpm-config should deliver RHEL specific configuration. Not some general purpose functions like filter_from_requires macro. Therefore request to move the filter_from_requires and similar macros from redhat-rpm-config to rpm-build is good.

On the other hand I understand that shuffling these things in the late RHEL-6' life is not much beneficial. I leave the decision to the redhat-rpm-config maintainer.

Comment 23 Ľuboš Kardoš 2015-12-09 15:24:42 UTC
Since rhel-6.7 rpm-build requires system-rpm-config (which is provided by redhat-rpm-config) so this is not a problem any more. I am closing this bug.


Note You need to log in before you can comment on or make changes to this bug.