Hide Forgot
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
(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.
(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.
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?
redhat-rpm-config should be installed in every buildroot. Which build is missing it?
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.
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.
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.
(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.
(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.
(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?
(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.
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.
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.
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.
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.
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.
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.
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.
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.