Bug 1415802
| Summary: | [RFE] Add --define option working the same as in rpmbuild | ||
|---|---|---|---|
| Product: | [Community] Copr | Reporter: | Michal Bocek <mbocek> |
| Component: | cli | Assignee: | Miroslav Suchý <msuchy> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | praiskup |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-24 13:17:57 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Michal Bocek
2017-01-23 18:54:57 UTC
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:
Release: %{?ci_release:%ci_release.}1%{?dist}
Another upstream discussion: https://pagure.io/copr/copr/issue/98 |