Unfortunately I don't have time to write draft, so just filing issue here and hopefully someone from FPC would write it instead (given that thing I'm talking about is very trivial).
currently packagers are doing things like
%if 0%{?fedora} > 12 %global with_python3 1 %endif
Unfortunately, I have always to look when I propose patch and see whether package is built for EPEL7 because if I will simply remove condition (given that Fedora is already 28 on the radar) I will break something for EPEL7.
So my proposal is to guide people to make their conditionals forward-looking by default which would mean to write code above as
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 12) %global with_python3 0 %else %global with_python3 1 %endif
Notes:
Hopefully I described it in understandable and making sense way, but if not -- let me know.
cc @ngompa
To reiterate what I mentioned in the meeting:
Metadata Update from @tibbs: - Issue tagged with: meeting
We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-2/2017-09-06/fpc.2017-09-06-17.00.txt):
will try to prepare some draft next week
Metadata Update from @ignatenkobrain: - Issue assigned to ignatenkobrain
Metadata Update from @ignatenkobrain: - Issue untagged with: meeting - Issue tagged with: draftneeded
Even though I was initial skeptical of the added complexity, I'm finding that the initial reasoning here really is correct and that it would be good if we had this. In fact, I find myself referring to this ticket when I need to see an example of how to do it properly.
Certainly if there are any examples in the existing guidelines that don't follow this pattern, we should fix them. I'll fix up any that I notice in regular usage but feel free to point out any which need fixing. Still need the draft and discussion of whether convenience macros are useful or needed.
Log in to comment on this ticket.