Hello,

since this change https://pagure.io/fesco/issue/2532 will not likely be 
accepted, I would like to ask if you were willing to accept a pull request to 
enable spec file preprocessing directly on rpm level. It would add a third type 
of macro (except `%{}` and `%()`), which would work similarly to `%()` except 
that the values (after expansion) would be put verbatim into the spec file that 
goes into an srpm generated by rpmbuild.

Basically, spec files would be always passed through `preproc` utility first 
before they would be handed over for further rpm processing. Enabling/disabling 
of this feature would be only system-wide, not spec-wide as you need to 
preprocess a template first before parsing it.

This is a way to bring innovation to rpm ecosystem mainly by:
- enabling automatic version, release, changelog, VCS generation e.g. from git 
metadata
- enabling dynamic source generation e.g. from a git submodule with mirrored 
upstream sources
- providing a way for automatic generation of requires and build requires by 
analyzing upstream sources

The only added dependency would the `preproc` utility, which I would just 
rewrite from python to C, it is less than 100 lines of code currently so it 
won't be a problem.

People basically didn't like that `rpmbuild -bs` would no longer always work on 
a spec file within Fedora DistGit after accepting the aforementioned change. 
Having the preprocessor directly in rpm would solve that problem.

-- 
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/issues/1472
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to