[Rpm-maint] [rpm-software-management/rpm] RFE: Allow automating %setup arguments (#368)
nim-nim
notifications at github.com
Sat Dec 9 15:51:52 UTC 2017
%setup is a wonderful macro but is shows its age. Massive software ecosystems (such as GitHub) no longer release software in archives that conform to the conventions %setup expect.
Nowadays spec writers need to spend a lot of time adapting spec headers to new release conventions, and they are usually tripped by the little %setup bit which is not in the same part of the spec but needs adaptation too.
**I'd like rpm to define a magic variable** (for example, %{setupargs}) with the following semantics:
if %{setupargs} is non nil
and %setup is called without arguments in the spec
**%setup takes the content of %{setupargs} as arguments**
**Benefits**:
- easy to define setup arguments in the same place as the rest of the header munging. No more "Drat I forgot to change %setup" (I know it's traditional, but really?)
- easy to automate %setup behavior in a macro such as
https://fedoraproject.org/wiki/Forge-hosted_projects_packaging_automation
- really safe: difficult to trigger accidentally, easy to remediate (both by adding %setup arguments manually or by setting %{setupargs} to %{nil} or ""). To be completely safe, a warning can be added when %{setupargs} is set
**Risks**:
Changing the behaviour of an historical macro such as %setup is scary, but the proposed way is really safe
**Difficulty**:
Seems rather easy to do for an rpm expert, in other words a quick win.
--
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/368
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20171209/60b89650/attachment.html>
More information about the Rpm-maint
mailing list