Description of problem:
Currently when I run copr from command line, it builds the package with fixed spec file macros. I would appreciate an copr-cli option which would be able to change any macro used in spec file.
The specific use case: using this option I'd like to change the name of the package version, for example adding timestamp to it.
Version-Release number of selected component (if applicable):
I disagree. Build system should be transparent and reproducible as much as possible. So if someone else send the same RPM again to Copr he should get the same option.
If you want to add timestamp to release or version, then it should be task of tool, which create SRPM for you.
E.g. Tito does that.
Well, at least it looks there were some good reasons to have support for
--define in mock (and copr still just a thin wrapper around mock).
I can imagine that having --define in copr-cli would simplify the task a
lot for trivial _static_ spec files (for new tarballs generated by e.g.
git archive). In such cases incorporating tito is just a plain overhead.
Also, I'd like to build multiple SCLs in one copr project (for example
autotools-git, autotools-latest, etc.), but that means I have to define
%scl macro explicitly in each package which is pain (multiple spec files
for the same packages built against different SCLs).
So I would still vote for '--define' support, but as a work-around for
plain CI purposes (Michal Bocek's case):
1. let's have a package 'relese-override' installing ..
2. .. /etc/rpm/macros.release-override ..
3. .. having '%ci_release %(date +"%%Y%%m%%d_%%H%%M%%S")' inside
4. Then add 'release-override' into minimal buildroot.
Then you can have something like this in your spec file:
Another upstream discussion: