Closed renegrob closed 9 years ago
From my reading of Fedora's documentation that you linked, their %{dist}
tag is not output in the resultant RPM directly. Rather, it is a macro used during packaging to incorporate the dist string into the "release" header, and also for use in conditionals when you need to generate things differently for different distros. To emulate this functionality in your use of redline, you can do something like this with Builder:
String dist = ".el6";
builder.setRelease("whatever_base_release"+dist);
if(dist.matches("^\\.el.*$")) {
// make RHEL-specific adjustments here.
} else if(dist.matches("^\\.fc.*$")) {
// make Fedora-specific adjustments here.
} // ...etc
If you are using the Ant task, you can do similar string-substitution and branching there with a variable as well.
Thanks a lot! I wasn't aware that it's so simple.
Is it possible to set the dist tag (https://fedoraproject.org/wiki/Packaging:DistTag)? There is a "distribution" header tag but this seems to be something different.