[Rpm-maint] [rpm-software-management/rpm] spec file preprocessing on rpm level (#1472)
Michal Novotný
notifications at github.com
Thu Jan 27 14:12:30 UTC 2022
> I checked quickly `preproc` and it seems quite limited to me at this point. It allows basic expansion, but no control flow & conditions.
I agree it's limited but so far it was enough to provide dynamically generated specs based on git metadata.
>
> Also I think `{{{` `}}}` is not the best choice, as it conflicts with variables, something like `%{{{{ to expand}}}}` wouldn't work as expected.
I think this case might be quite hypothetical, i.e. that you would want to work with dynamically named rpm variable? You could do `{{{ echo %{$<something>} }}}` in that case. But it's also possible to make the tags configurable if that was really a problem.
>
> Also, what does it bring compared to `%{lua:...}` ? (which could run a bash script if necessary)
%{lua:...} scriplets are evaluated during rpm spec evaluation, here we are talking about an earlier step. If the question is why not use lua language rather than bash for evaluation code inside `{{{ }}}` tags, then I would say, because bash is simpler to use for wider range of people.
>
> (btw, `preproc` as a name for such tool, not the best idea)
It is supposed to be a generic text-preprocessing tool, hence preproc. Usage generally is `cat file.txt | preproc`.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1472#issuecomment-1023251536
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/1472/1023251536 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220127/9f7b73a2/attachment-0001.html>
More information about the Rpm-maint
mailing list