Dne 09. 10. 23 v 9:21 Petr Pisar napsal(a):
V Fri, Oct 06, 2023 at 06:06:14PM +0200, Vít Ondruch napsal(a):I am still playing with idea of executing RPM dependency generators on the .spec file which ships them. I have created RPM RFE ticket quite a while ago here: https://github.com/rpm-software-management/rpm/issues/782 So for no luck with having this implemented. However, I think there is reasonable way. It would be enough to have some generic attr file around. I have create small test package exploring this idea and you can find it in my Copr repo: https://copr.fedorainfracloud.org/coprs/vondruch/rpm-local-generator/ https://copr-dist-git.fedorainfracloud.org/cgit/vondruch/rpm-local-generator/rpm-local-generator-support.git/tree/rpm-local-generator-support.spec On the same place, you can also find package leveraging this concept: https://copr-dist-git.fedorainfracloud.org/cgit/vondruch/rpm-local-generator/rpm-local-generator-test.git/tree/rpm-local-generator-test.spec Would somebody else benefit from this idea/package or can somebody spot some issue with it? Thx for feedback.That's hilarious because it's completely out of specification for the genarators <https://rpm-software-management.github.io/rpm/manual/dependency_generators.html#generators>: A generator is just an executable that reads file name(s) from stdin While your rpm-local-generator-test.spec redefines it to a function reading an argument: %global __local_generator_provides() local-generator-provide(%%{basename:%{1}}) I'd like to see comments from RPM maintainers.
This is documented: https://rpm-software-management.github.io/rpm/manual/dependency_generators.html#parametric-macro-generators-rpm--416I have used the function just because of simplicity, nothing else. You can see real life usage of the function generators here:
https://src.fedoraproject.org/rpms/python-rpm-generators/blob/rawhide/f/pythonname.attr
Does it work for multiple files packaged in rpm-local-generator-test.spec?
The test example includes two files and there are generated provides for both of them So yes, it works for multiple files if I understand your question.
Vít
-- Petr _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue