Created attachment 770456 [details] test.attr - Copy to /usr/lib/rpm/fileattrs/ Description of problem: When macro %filter_setup is used in spec, suddenly, %{version} passed as an argument to script defined in /usr/lib/rpm/fileattrs/foo.attr stops exapnding. Version-Release number of selected component (if applicable): 9.1.0-45.fc19 How reproducible: Always Steps to Reproduce: * All referenced files will be attached 1. Copy test.attr to /usr/lib/rpm/fileattrs/ 2. Either copy test.tar to your rpmbuild/SOURCES and test-nofilter.spec and test-filter.spec to your SPECS, or unpack corresponding SRPMs 3. Run rpmbuild -ba on both files 4. Run rpm -q --provides -p on both generated binary RPMs (not debuginfo packages) Actual results: $ rpm -q --provides -p test-nofilter-1.0-1.fc19.x86_64.rpm test = 1.0 test-nofilter = 1.0-1.fc19 test-nofilter(x86-64) = 1.0-1.fc19 $ rpm -q --provides -p test-filter-1.0-1.fc19.x86_64.rpm test-filter = 1.0-1.fc19 test-filter(x86-64) = 1.0-1.fc19 test = %{version} Expected results: $ rpm -q --provides -p test-nofilter-1.0-1.fc19.x86_64.rpm test = 1.0 test-nofilter = 1.0-1.fc19 test-nofilter(x86-64) = 1.0-1.fc19 $ rpm -q --provides -p test-filter-1.0-1.fc19.x86_64.rpm test = 1.0 test-filter = 1.0-1.fc19 test-filter(x86-64) = 1.0-1.fc19 Additional info: In test.attr is used echo for simplification. This bug is not limited to echo. Other macros than %{version} might be affected too, but macros such as %{_datadir} or %{python_sitelib} work fine when used in path variable.
Created attachment 770457 [details] test.tar - Copy to SOURCES (contains empty dir named test)
Created attachment 770459 [details] test-nofilter.spec - Copy to SPECS
Created attachment 770460 [details] test-filter.spec - Copy to SPECS
Created attachment 770461 [details] test-nofilter SRPM
Created attachment 770462 [details] test-filter SRPM
Yes, one of the unwanted side-effects of %filter_setup is that it switches rpmbuild to the "external dependency generator" mode where spec macros are not (and can not be made) available. The answer is simply: dont use the fedora-specific %filter_setup. Rpm >= 4.9.x has built-in dependency filtering, use that instead: http://rpm.org/wiki/PackagerDocs/DependencyGenerator
Shouldn't we obsolete %filter_setup (make it do nothing) and map %filter_provides_in to %__provides_exclude_from and %filter_from_provides to %__provides_exclude (and the same thing to requires)?
Optimally yes, but the two filtering methods differ too much for that.
Is there a workaround, how to pass version to .prov script, when old %filter_setup is used?
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.