[Rpm-maint] [rpm-software-management/rpm] spec file preprocessing on rpm level (#1472)

Marc-Andre Lureau notifications at github.com
Thu Jan 27 21:53:45 UTC 2022


> I mean this is a good question. One reason for having a preprocessing stage is existence of source rpms. Basically both lua scriplets and shell expansions are evaluated once srpm is built and then later when rpm is built from that srpm. The thing is that contexts (i.e. what information is available to the build process) is different each time. [..]

> Therefore if such external context is to be used, it should be done so that evaluation is done only once (when building the srpm) and later the same precomputed results are used without any additional evaluation.  [..]

It doesn't look like `%{}` are evaluated/expanded at srpm-build time.

However, if we added some srpm time expansion, that would fit your requirement, no?

```
%{lua(source):
print('%changelog')
exec whatever etc..
}
```

Common code for generating changelog from git could be added the the lua rpm extension, so packagers could call:
%{lua(source): rpm.git_changelog()}

I just found out there is an %autochangelog now: https://fedoraproject.org/wiki/Changes/rpmautospec, did you know?!





-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1472#issuecomment-1023671747
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/1472/1023671747 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220127/bca0f3d1/attachment.html>


More information about the Rpm-maint mailing list