When we build the ResultsDB package internally we are not able to use EPEL packages, and thus, the build fails.
This allows the builder to toggle the without_epel macro, which will allow for internal builds without a lot of altering on the spec file.
Details
I tested a build with without_epel turned on and it worked as expected. Someone will need to test this for when without_epel is turned off.
Diff Detail
- Repository
- rRSDB resultsdb
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
The double negatio in all the if-clauses is kind of hard to process for me. Might be because of the fact that I'm not a native speaker, but something like %global epel_available 0 and %if 0%{?epel_available} would be much more readable for me. (And this is why I'm "Requesting Changes").
I also have a question about the problem overall - is this a problem only for internal builds, or is this generally a problem of RHEL? Because if it's a Fedora vs. RHEL thing, then the epel_available (or without_epel as it is now) macro seems a bit unnecessary, and %if 0%{?fedora} instead of the %if !0%{?without_epel} would feel much cleaner, and would also prevent us from needing a separate EPEL branch just because a macro needs to have a different value (this I might be misunderstanding, but the "there needs to be an epel branch" was said in an email conversation that I was part of, and I'm not sure whether this is _the_ solution, or a thing done to not need it).
Ah, OK, never mind me then - I don't really do packaging at all, so this was more of "It's hard to parse, maybe this was over-engineered" since that sure happens to me all the time :)
I'm not dead set on without_epel. That macro name made sense to me because that's what's being switched - supporting epel or not. If the general consensus is that %if 0%{?fedora} is more readable, that's with me.
Otherwise the specfile looks good to me.
I guess you can merge it? @tflink is happy with it, and I don't really do packaging that much to be really opinionated.
@mprahl I'm not sure whether you have commit access to resultsdb - could not get it from pagure, but it's just me being unable to successfully use it.
If you don't please provide a diff that can be applied on current devel branch, and I'll merge it for you.
@jskladan, I don't have rights to commit on ResultsDB. I updated the diff. Thank you for your help.