[Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

Panu Matilainen notifications at github.com
Tue Feb 23 09:53:25 UTC 2021


Wrt implicit/explicitness of it all, it occurred to me that there are two quite distinct cases:
1. spec invoking a script that does something - such as invoke %find_lang with extra flags
2. upstream build system (makefiles etc) doing something

For 1. you want it to "just work" without further ado (it's already explicit in the spec afterall), but for 2. that needs to be a packager decision. One crude but relatively simple way would be using different directories for these, with the directory for 1. being outside the package builddir so upstream make system has "no access" (because it doesn't know where it is), and 2. in a well-known location in the build directory, that would only be used if explicitly enabled in the spec somehow.

That conceptual split seems resolve the implicit/explicit problem for me (actual implementation is another question). You'd still want to programmatically tell whether a spec relies on this for sub-package generation though. One could easily flag it in the SRPM one way or the other, but not the spec alone for 1.

One possibility could be (going back to) a new spec section that simply executes after %install, but without any special parsing. Then you can easily tell at spec parse whether this is used or not, like with `%generate_requires`. Only something there doesn't feel right :thinking: 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1485#issuecomment-784046850
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210223/7fe3a13a/attachment.html>


More information about the Rpm-maint mailing list